Open wiredearp opened 7 years ago
Note to self: Also expose onflex
with some kind of LifePlugin
event.
thumbs up for onrender
callback to make unit test more handy. One example how we do currently.
const handler = {
onlife: () => {
if (table.rows().length === 1) {
expect(table.pager().page).toBe(1);
expect(table.pager().pages).toBe(4);
table.life.remove('gui-life-render', handler);
}
}
};
table.life.add('gui-life-render', handler);
Categorised as Spiritual Issues
If you are injecting custom HTML (such as images) into a UI component (for a demo or a prototype), you are bound to be disappointed when the HTML disappears after an EDBML update.
@vvvts is currently using this technique to simulate a proposed feature in the Table.
To support this kind of hacking, all components should hook into
onrender
and call a user defined method for this kind of post-render processing. We'll just need to come up with a good name, now thatonrender
is used by the component internally.