-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Create CustomList
#85
base: master
Are you sure you want to change the base?
Conversation
ac42c2e
to
7151f6a
Compare
I'll just add an initializer which takes sectionned content but a single selection, I need it for #78. |
I just tested with the attached window, and it works (using Also, the attached window is not key, so it gives this bad result. However, this must be fixed in the other PR, and https://github.com/smic/SuggestionsDemo seems to handle it well. We'll see. |
No it does not. I changed a few things to use I will have to add some environment value or value in the initializer to force the usage of |
The magic of SwiftUI: I just added @nesium Should I add this modifier on |
870403e
to
dc70ee3
Compare
Following a Slack discussion on #78 (comment), we decided to reimplement a basic SwiftUI
List
using aVStack
.I managed to recreate a good portion of the
List
API, or at least what we will need of it.Here are the results:
When the window is not key:
With sections (supports
.headerProminence(.increased)
):I had to create a custom selection shape, to get the same effect as
List
when multiple items are selected and touch each other:There is no support for keyboard navigation. This must be implemented higher in the hierarchy, or I can implement it here as well if needed. The higher implementation will be necessary anyway, when the list is not first responder, which is the only place where we will use
CustomList
, so I don't think we need to duplicate this code.Initial TODO list from #78: