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

[New] Add 'fixed' option to allow position-fixed appendToBody pickers #2229

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hsource
Copy link

@hsource hsource commented Feb 17, 2023

Motivation

We are trying to use the date-picker in a small position: fixed container with overflow: hidden. To make it escape its container using a portal, we use appendToBody={true}

This mostly works, but because the container is appended to the body in a static layout, the date picker becomes invisible once we scroll down the page.

Fix

  1. Add appendToBody="fixed" as an additional option, in addition to the normal booleans. Update all PropTypes

Testing

Added new automated Mocha tests that verify that position: 'fixed' gets added when appendToBody="fixed" is set

@hsource
Copy link
Author

hsource commented Oct 16, 2023

@ljharb Is there any chance you can review/merge this in? I'd appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant