Can a table automatically re-sort or keep the sort when items change?

We have tons of tables in our app, and often the contents get completely replaced. When that happens, the table does not re-sort the contents. Is there a way to force that behavior?

The book
example
show the same behavior we see

  1. Sort the table
  2. Click the ‘Recreate Data’ button

You’ll see that the data is not sorted, but the table still indicates that it is sorted on that column. Any suggestions as to the right way to fix this?

Similar thread here:
https://vaadin.com/forum#!/thread/7631944