-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[DateRangeInput] Add popoverProps prop #940
Conversation
@@ -6,7 +6,7 @@ The `DateRangeInput` component is a [control group](#core/components/forms/contr | |||
|
|||
Use this component in forms where the user must enter a date range. | |||
|
|||
@react-example DateRangeInputExample | |||
@reactExample DateRangeInputExample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed this docs bug
Fix another lint problemPreview: documentation |
@@ -124,6 +125,11 @@ export interface IDateRangeInputProps extends IDatePickerBaseProps, IProps { | |||
overlappingDatesMessage?: string; | |||
|
|||
/** | |||
* The props to pass to the popover. | |||
*/ | |||
popoverProps?: IPopoverProps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial<IPopoverProps>
because content
is required...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -276,17 +283,18 @@ export class DateRangeInput extends AbstractComponent<IDateRangeInputProps, IDat | |||
/> | |||
); | |||
|
|||
// allow custom props for each input group, but pass them in an order | |||
// that guarantees only some props are overridable. | |||
// allow custom props the popover and each input group, but pass them in an order that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a word?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -124,6 +125,11 @@ export interface IDateRangeInputProps extends IDatePickerBaseProps, IProps { | |||
overlappingDatesMessage?: string; | |||
|
|||
/** | |||
* The props to pass to the popover. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth mentioning which props are ignored?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
Respond to CR feedbackPreview: documentation | landing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Addresses #805
Checklist
Changes proposed in this pull request:
popoverProps
prop toDateRangeInput
to support custom callbacks forpopoverWillOpen
,onClose
, etc.autoFocus
,content
, orenforceFocus
, because that would lead to sad times w/r/t UX.isOpen
and other popover props.Reviewers should focus on:
isOpen
?