TableRecord with MultiSelected items that stick while navigating

TableRecord with MultiSelected items that stick while navigating

  

Hi,

When using scaffolding to generate a master detail page, a table record is created with a checkbox column to select multiple items, but it only works for the current page.

If someone moves to another page and comes back the selected items are lost!

PS: The selected items are also lost when reordering the records by any column :/.

  1. Is this the expected behavior?
  2. Either way, how could we have a TableRecord with MultiSelected items that stick while navigating the table pages?

Cheers,

João



Hey João! How are you doing?!


That's the default behavior. For you to keep the selected items after reorder or page navigation, you need to keep it on your side, like in local variable of the identifier of the objects you're listing. Still, there's a good reason that they are cleared, it's a UX thing. Imagine that the user will be deleting the objects that are listed and selected. He'll be deleting objects that he's not seeing... be careful.