I would like to add a custom row at the bottom of an ember-table so that it will allow the user to insert new rows to the table. Which approach should I take? The idea is similar to the one asked here but using a fixed row and ember-table.
How to add a custom row for adding data to ember-table?
1k views Asked by Henry Vonfire At
1
I'd suggest extending Ember Table to override
footerContent:You'd then override
Ember.Table.Rowwith a custom row, and put that intofooterContent. You could define an extra action on that row which grabs the row's data and adds it tocontentbacking the main table. (You'd need to pass a reference tocontentinto your custom row).You can do the same thing by overriding
bodyContent, but I think using a footer is perfect for this purpose, and I increasingly think overridingbodyContentis a bad idea.