Skip to content
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

Adaptive width using JS #27

Merged
merged 1 commit into from
Oct 15, 2022
Merged

Adaptive width using JS #27

merged 1 commit into from
Oct 15, 2022

Conversation

ycs77
Copy link
Owner

@ycs77 ycs77 commented Oct 14, 2022

Fixed #24

There are cases where CSS relative does not properly synchronize the width of the floating element, such as when using the portal at the same time. At this point, you can use the adaptiveWidth prop, which uses the ResizeObserver API to monitor the width of the reference element and synchronize it to the floating element, but the performance will be worse than the CSS implementation.

Usage (React)

<Float adaptiveWidth>

Usage (Vue)

<Float adaptive-width>

@ycs77 ycs77 marked this pull request as ready for review October 15, 2022 04:12
@ycs77 ycs77 added vue react enhancement New feature or request labels Oct 15, 2022
@ycs77 ycs77 merged commit 1ec4a58 into main Oct 15, 2022
@ycs77 ycs77 deleted the adaptive-width-using-js branch October 15, 2022 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request react vue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adaptive width breaks when using portal on a Listbox/Combobox
1 participant