-
Notifications
You must be signed in to change notification settings - Fork 561
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
[combobox] Binding value
undesirely expands combobox
#755
Comments
@chaance I updated the description with a specific example. Does anything from the HTML code look phishy? More info: This appears in a high-load szenario. So we build a very large form which even sometimes triggers the Browser "webpage not reacting"-Warning. It seems to work in situations, where the overall initial layout generation process is faster! |
@bentolor Looking at just the Combobox part of your snippet above, I don't see any issues with its construction, but it's difficult to debug static example code, especially when there is more code than Reach playing a part, and you're saying it's context-specific. Would you mind including creating a minimal reusable example with the CodeSandbox Template so that we can isolate the issue to Reach to better solve your problem? |
Don't mean to hijack your thread @bentolor but what you describes sounds familiar and brings to mind an issue I'm struggling with myself and considered opening an issue for. And since you don't have an isolated example, I post this to try to help with that. So please confirm if this replicates your problem or not: https://codesandbox.io/s/reach-combobox-forked-lxxuj?file=/src/App.js The issue is that changing the value in the input field programmatically by changing the variable passed to the value prop of input field opens the popover with suggestions. Preferrably the field would get the new value and the popover would not open. The popover should only open when the field is activated by the user by clicking/focusing on it, or typing in the field if |
Thanks @indiesquidge and @geekus for your kind feedback! Yes, @geekus – glad that you jumped in! That looks exactly like our issue! I only wonder, because the issue is not appearing in all of our comboboxes. Maybe due to different points in time, when the value actually is set? We are already in the bugfixing cycle and the deadline is pressing. Therefore I'll fail to deliver a reproducer. The final (simple) editor will be open-source, so I'll be able to provide the showcase, soon. But I'm pretty confident that @geekus already pinpointed the issue. Any hint for a quick'n'dirty workaround? Otherwise we'll probably have to go to replace it. :-( |
Yes, from my experience it seems like if the value is set before the combobox or input is rendered, and then not changed, it will not open. But if changed after first render it opens the popover. |
@bentolor I was just wondering if you managed a workaround for this at all? I'm having a similar issue and was wondering if there was a solution you ran with? |
@karlwills Due to time constraints and the fact, the the handling inside the Reach Combobox is managed by a state machine and according to our quick research the place where a fix would be needed no longer can distinguish between "user triggered change" and "programatically triggered change" we reckoned that there won't be a easy 3-liner fix. Therefore we dropped reach-combobox in favour of |
value
undesirely expands comboboxvalue
undesirely expands combobox
This was addressed in #783, but I actually need to revert that as it introduced some other regressions that I unfortunately didn't discover until after I merged it. I will work on a new fix for this next week. |
This PR introduced regression in some cases where the popover doesn't open until the user presses the down or up key after initial input. See #755 for the related issue.
Any workaround to this, I tried to trigger manually EDIT: I downgraded to |
🐛 Bug report
Thanks @chaance for this beautifuly library. We are trying to use it in a Form editor page and have an issue with the combobox
Current Behavior
When we set the current value, the combobox displays the expand state including popup on some instances. This even occurs if it is not visible (i.e. being in a collapsed section). Regardless of that, it makes it unusable, as it overlays/hides many other fields in the form.
We have 321 comboboxes in the page and (the same) 10~15 comboxes reveal this behavior.
This is how we use it in React:
This is one example of the popup code of one of the initially expanded Combobox. It misses the
hidden=""
as present in the other<reach-portal
instances.This is the html node of the affected combobox
Expected behavior
The combobox should not expand itself unless by user interaction
Reproducible example
Sorry – I have no minimal reproducible at hand, as it seems only to happen in specific constellations.
I hope the issue might be obvious/simple enough by the upper code example.
Suggested solution(s)
I don't know. Any clue what might cause this behaviour?
Is it by design?
Is it a bug?
Is there an easy workaround?
Your environment
The text was updated successfully, but these errors were encountered: