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

Design of filtering for bound value tables not scalable #42

Open
reedes opened this issue Mar 8, 2022 · 1 comment
Open

Design of filtering for bound value tables not scalable #42

reedes opened this issue Mar 8, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@reedes
Copy link
Contributor

reedes commented Mar 8, 2022

Applies to tables with bound values, where an if {} is used in the ViewBuilder to include only rows that pass the filter.

This works fine for small row count, but wouldn't work well for larger row counts.

(Doesn't apply to Core Data, where it's assumed that the developer will apply a predicate to the FetchRequest to filter rows.)

The README table of views notes this issue as a caveat.

@reedes reedes added the bug Something isn't working label Mar 8, 2022
@reedes
Copy link
Contributor Author

reedes commented Mar 8, 2022

One possible approach is to not use a simple binding for the array of values, but rather place the them inside an observable model object, as described here:

https://peterfriese.dev/posts/swiftui-listview-part2/

Note in particular the dynamic filtering done on the list search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant