-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
AutocompleteInput suggestions list location in filters #2259
Comments
wow, such a weird bug! Thanks for reporting it. |
Could this be related to #2256? |
possibly |
I just saw the new component (See when adding tags Rock and Crossfit) |
I had the same error here and found a possible solution. The problem happens because the I noticed that when the original input element moves, React is keeping the old My solution is to create a new object that mimics the original const anchorEl = !this.inputEl
? null
: {
getBoundingClientRect: () =>
this.inputEl.getBoundingClientRect(),
}; Then I'm using this Here is my implementation, let me know if is fine for a merge request: |
I noticed that I was forcing the So now I'm keeping a reference to the old position and only forcing the redraw when the I still don't know if this is the proper way to solve this issue, maybe we can store the My solution is based on this example from |
Can you please also add this solution on AutocompleteInput? |
@selenyillar, #2928 solves the problem also for |
General description
In filters of a
List
module, if aReferenceInput
withAutocompleteInput
is moved after adding/removing another filter, the suggestions list stays at the old location.What you were expecting:
When I add a new filter, I want the suggestions list of the previous
AutocompleteInput
to be moved to the right place.What happened instead:
When a new filter is added/removed to a
List
, theAutocompleteInput
is moved to the right place, but the suggestions list opens at the old location of the filter.Steps to reproduce:
When adding a filter:

When removing a filter:

Related code:
Other information:
No error stacktrace.
Environment
The text was updated successfully, but these errors were encountered: