-
Notifications
You must be signed in to change notification settings - Fork 34
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
Simpler Reorderable Lists Api #109
Comments
Yes you are totally right. I wrote the Reorderable stuff to be as generic as possible, which is useful. But a simple function for the normal case given a slice is a great idea. Will do. |
I added a helper function I spent a lot of time trying to figure out a useful function that did it all in one go, but as of now I'm not sure it makes sense. Like you wrote, it would have to take a callback to render the entry in the list but that seems as complicated as directly using the widget. I'm also struggling to think of a usecase where the containing code didn't care when things got reordered. But this did give me the nudge to make ReorderWidget a normal widget (it had been a kind of half-way widget from during development). I think we'll have to wait for some usecases to show up to understand if a wrapping function is worthwhile. Sound good? |
Thanks! I will experiment with the new widget in my structEntry pr and see how it ends up working. |
The
simple
reorderable list example still seems quite complex. I struggled to understand the simple and advanced usages inExample.zig
For example, it seems like this function could be automatically generated with comptime, and shouldn't need to be manually written by the user
It would be really nice to have some reorderable list helper functions which would make this widget much more convenient to use.
For example, something along the lines of
might be possible
The text was updated successfully, but these errors were encountered: