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

Detailed List Sorting and assigning new accessors #2563

Open
volxage opened this issue May 10, 2024 · 1 comment
Open

Detailed List Sorting and assigning new accessors #2563

volxage opened this issue May 10, 2024 · 1 comment
Labels
enhancement New features, or improvements to existing features.

Comments

@volxage
Copy link

volxage commented May 10, 2024

What is the problem or limitation you are having?

I have a detailed list with many attributes. In order to sort by those attributes I need to sort the list of rows itself, I then need to then notify("clear") then notify("insert", row) for each row in the list. This is performant enough on Linux but is extremely slow on Android; I presume it's making a new list each time, or something like that. This issue alone is making me consider writing my project for each platform individually, so I feel as a whole this is a pretty important issue.

Describe the solution you'd like

I would like to see a performant solution to both of these issues. A sort function would be great but I would be more interested in an added notify() option of the likes of "all_changed", where the platform rerenders the entire list. I understand you could just re-declare a new detailed list but if I remember correctly, that's even slower than re-rendering each row manually.

Describe alternatives you've considered

It's possible that this specific is too specific and too complex to implement.

Additional context

@volxage volxage added the enhancement New features, or improvements to existing features. label May 10, 2024
@freakboy3742
Copy link
Member

An interesting idea; the question is how and when such an event would be triggered. However, conceptually, I can definitely see the value in a "refresh" style event that redraws all the rows in one pass.

As an immediate workaround, you'll likely find that if you explicitly set the data source to itself, it will trigger this style of update. A change of source triggers a clear/re-create; although the usual reason for invoking this is "I want a different list of data", "the same data in a different order in the same DataSource" would be functionally indistinguishable.

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

No branches or pull requests

2 participants