Last active
November 17, 2020 05:57
-
-
Save YonatanKra/ce8d0578469b1c06a98d48f62192f8ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refreshData(data, clear = false) { | |
if (!clear) {...} else {...} | |
data.forEach(datum => { | |
const element = document.createElement('data-table-row'); | |
element.setAttribute('name', datum.name); | |
element.setAttribute('id', datum.id); | |
element.setAttribute('email', datum.email); | |
this._dataTable.prepend(element); | |
}); | |
DataApp.emitEvent(this, 'refreshed-data', { | |
scrollHeight: this._dataTable.scrollHeight | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment