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

[table]: Allow exanding rows, redrawing only the toggled row #69

Open
ctron opened this issue Jul 17, 2023 · 3 comments
Open

[table]: Allow exanding rows, redrawing only the toggled row #69

ctron opened this issue Jul 17, 2023 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ctron
Copy link
Member

ctron commented Jul 17, 2023

Currently we do have a full state of the table. Toggling a table entry forces the full table to be re-drawn. This should be more efficient and only toggled rows should be re-rendered.

@ctron ctron added bug Something isn't working help wanted Extra attention is needed labels Jul 17, 2023
@phill-85
Copy link
Contributor

Have you tried using keys? https://yew.rs/docs/concepts/html/lists#keyed-lists

@ctron
Copy link
Member Author

ctron commented Jul 18, 2023

Yes, the current implementation is actually using them. However, that still means that the whole table needs to be re-processes.

I would hope that there's a solution where each row becomes a component, and manages its own state. The downside of that might be that there is no (table) global state for expansions. Which might be ok in most scenarios I guess.

Then again, I guess we need to split up the current table component into smaller bits, and follow the idea of "composition" to build different ways of dealing with tables. Maybe having different approaches for different use cases.

@aDogCalledSpot
Copy link
Contributor

#128 addresses the composition issue. So implementing this should be possible now. However, Table doesn't currently use state internally per row so that would still need to be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants