Here is a link to a small public github repo that contains two .zip files of the 2 implementations in small test project formats. There are some comments to point you all towards in the ContentView in each.
Any insights are greatly appreciated!
Post
Replies
Boosts
Views
Activity
Thanks for the reply!
We added the enumerated list separately and used a local variable to do the looping in the list. The issue seems to persist.
We've been trying to apply what you told us for the focusedValue but we don't see how it could be used in our case.
In the FocusCookbook RecipeGrid.swift example provided, focusedValue is used to change the macOS commands that will appear to the user depending on the context provided (in this case a recipe).
We don't see how applying focusedValue to our screen would solve our issue. We're already passing the focus state to each view in the List. Also, how would we change the onChange in there?
To reiterate on our use case, we have multiple cells that the user can focus onto but we want for only one cell to be focused at a time. Because of that, we added a @FocusState property to the main screen and sent bindings to all the rows in our list, so they can summon focus for themselves and also have a way of blocking the other cells to regain focus.
Could you be more specific on how could we apply focusedValue to our solution and what would it improve?