Hi,
AddRow
adds rows to the end or at the top
The second argument is optional and determines whether the row is added to the top or bottom of the table. A value of
true
will add the row to the top of the table, a value offalse
will add the row to the bottom of the table.
as described here You send false
so new lines are added to the bottom resulting in the table sorted ascending.
you can trigger the sort by setSort()
and by using the arrow keys on the header. (if you use these it is perhaps good to know that you can receive the current sorting by getSorters()
and then add your new lines at the top or at the end depending which state is set. Maybe this can be tricky if you have multiple clients showing the data because they might be not in sync,
How to scroll to the new line I think I already answered here Problem with data displayed in UI-Table when switching Tabs - #7 by Christian-Me