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

fix: allow custom modal manager for DatePicker #1141

Merged
merged 3 commits into from
Jul 31, 2020

Conversation

meganaconley
Copy link
Contributor

Description

If a DatePicker component is included in a modal, pressing escape will close both the DatePicker and modal as they have different modal managers. This PR allows for a custom modal manager to be passed down from a parent component.

@meganaconley meganaconley requested review from jacobdevera and a team July 30, 2020 21:27
@netlify
Copy link

netlify bot commented Jul 30, 2020

Deploy preview for fundamental-react ready!

Built with commit bb4c1d0

https://deploy-preview-1141--fundamental-react.netlify.app

Copy link
Contributor

@jacobdevera jacobdevera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working well in our internal component library playground 🚢

@meganaconley meganaconley requested a review from a team July 31, 2020 19:08
@@ -364,6 +364,7 @@ class DatePicker extends Component {
todayAction,
validationState,
weekdayStart,
modalManager,
Copy link
Contributor

@skvale skvale Jul 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add this to the propTypes for DatePicker as well

/** If DatePicker is to be rendered in a modal, the parent modal manager can be passed as a prop */
modalManager: PropTypes.object,

@meganaconley meganaconley merged commit 8238c44 into master Jul 31, 2020
@meganaconley meganaconley deleted the fix/datepicker-close branch July 31, 2020 20:08
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

3 participants