irossimoline/angular4-material-table

createNew function

Closed this issue · 4 comments

hi
while creating new item, I want to see added empty-data row at the top of table instead of buttom of it.
Is there any config setting to do this or should I change source code. If source code should be changed, How can I change?

Hi @fatihkurnaz,

Sure, if you check readme.md you can see that when you create the TableDataSource you can set the 4th argument (config) to have the property prependNewElements with true value, which is false by default.

With prependNewElements as true, new elements get inserted on top.

If you have any other doubt please reach me out.

Thank you it worked 👍 Another doubt is paginator. I tried to insert paginator property for high-volume content. Do you have suggestion on this issue

I'm not getting the point here. Are you just trying to insert a paginator?
You just have to use (for example) angular paginator, and fill it with appropriate values and correct function to be called on page change event.

thank you again :)