-
Notifications
You must be signed in to change notification settings - Fork 117
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
Popover doesn't re-render its view when identity changes #72
Comments
I came to a partial solution for this an PRed it with #73, but that strictly supports cases where the view that's presented in the popover has its own properties defined with It seems that supporting the specific case originally laid out in this issue is pretty non-trivial, because the popover is rendered in its own That has proved a rather difficult challenge to overcome. I've tried to no avail:
It seems that SwiftUI needs to expose an API for updating a |
Presenting the popover has been one of the hardest challenges since the start of this library. At first I was adding a new |
Let's say I have a custom-made text field that updates its content binding on every user keystroke. Let's also say I have a popover that displays some options based on what the user has typed into that text field:
I would expect that the list of states displayed in the popover would update with every keystroke, but that doesn't seem to be the case. Strategically inserting debugger statements shows that the
$selectedState
is definitely getting updated for every keystroke, but the view that the popover renders never updates to include the narrowed list of possible states. How can I get it to update whenever its displayed view's identity changes so I can make something like this work?The text was updated successfully, but these errors were encountered: