-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
measureInWindow doesn't work properly for multiple similar mounted components #2589
Closed
1 task done
Labels
Comments
For now workaround is using html element ref for web, provided by findNodeHandle: measureComboboxLayout: (
callback: (x: number, y: number, width: number, height: number) => void
) => {
if (!comboboxHtmlRef.current) {
return
}
const rect = comboboxHtmlRef.current.getBoundingClientRect()
callback(rect.left, rect.top, rect.width, rect.height)
} |
6 tasks
This issue is reproducible for the inverted You can try the following code. Without inverted, it looks like working but doesn't work with
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Describe the issue
After upgrading from 0.18.4 to 0.19.8 version (and tried other 0.19.x with same result), measureInWindow returns the same result for all similar mounted components.
In out case the modal is rendered in the same position for all dropdowns - at the most top dropdown.
Here on the screenshot the focused combobox was clicked, but modal appeared at the first one.
On 0.18.4 version it works.
Expected behavior
measureInWindow works properly.
Steps to reproduce
Use this code to measure coordinates:
and mount several similar components at once on the page. The result will be the same for all of them.
Test case
wil provide later if needed
Additional comments
No response
The text was updated successfully, but these errors were encountered: