Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded row collapses after calling load() #183

Open
cicorfus opened this issue Feb 19, 2025 · 1 comment
Open

Expanded row collapses after calling load() #183

cicorfus opened this issue Feb 19, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@cicorfus
Copy link

When using "expand" on a table a expanded row will collapse when updating the table by calling load().
Is it possible to prevent that?
And is it somehow possible to have multiple rows expanded?
I guess that goes into the same topic, as the table gets refreshed and previous expanded rows are getting collapsed.

@uap-universe uap-universe added the enhancement New feature or request label Feb 20, 2025
@uap-universe
Copy link
Collaborator

It is possible, but only with some manual work where you would need to remember the expanded state of each row and restore it after rebuilding the table. Alternatively, it might be possible to update the data in your rows in-place with your new data instead of calling load().

The smart table was always missing some sort of "update" method for data, which would be merging a data set into the existing one, preserving the visual appearance.

In an ideal world, I would like to invoke some sort of update() method instead of load() which does the following:

  • based on a key (e.g. database ID) existing rows are updated with data passed to update()
  • keys that cannot be found in the update set will be removed from the table (configurable, in case we want partial updates!)
  • new data is added to the table (append + sort, or better directly via insertion sort)

But that would require a cleaner separation of DataSource and DataSet and an overall architecture overhaul.

Unlikely this will happen, see also #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants