anvilistas / ReactivePersistenceTabulatorDemo

0 stars 0 forks source link

Reactive current selection #11

Open meatballs opened 1 week ago

meatballs commented 1 week ago

Currently, when a row is clicked in the index form, the logic to instantiate the detail form and open it in the sidesheet happens in the index form.

Should we perhaps separate those concerns?

e.g. We hold the 'currently selected item somwhere as part of the global state and make it reactive. The index form tabulator would then simply update that current selection.

We'd then have a render effect somewhere to control what happens as a result of that change - in the demo, that would open the sidesheet with the selected item displayed within the correct detail form.

meatballs commented 1 week ago

Another thought...

We could route to a module instead of a form and do all the url handling there - something similar to an MVC controller. That could then handle the opening of the index and detail forms.