Created
November 17, 2020 06:10
-
-
Save YonatanKra/5a7dc633353f9695176c005dda01f0e0 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); | |
}); | |
requestAnimationFrame(() => 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