-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiSuperDatePicker] add showApplyButton prop #1399
Conversation
@cchaos @chandlerprall @snide |
For context. We realized that using this in kibana we'd need to use it in concert with @Bargs' filter bar. We don't want to have two update buttons in use, so the idea was to allow the datepicker to handle the button part optionally. I've set a meeting for next week to figure out how we tie these two components together, but let them live separately as well. |
… remounted which causes the popovers to close unexpectedly
@chandlerprall @cchaos I don't think any redesign is needed for the absolute and relative tabs any more. This PR is ready for review |
<EuiFormRow | ||
label="start time" | ||
> | ||
<EuiFieldText |
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.
Can you move these inputs to below the actual component and make them readOnly
instead of disabled
?
@@ -236,6 +258,10 @@ export class EuiSuperDatePicker extends Component { | |||
} | |||
|
|||
renderUpdateButton = () => { | |||
if (!this.props.showApplyButton) { |
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.
… under super date picker
CHANGELOG.md
Outdated
@@ -1,8 +1,8 @@ | |||
## [`master`](https://github.com/elastic/eui/tree/master) | |||
|
|||
No public interface changes since `6.0.1`. | |||
- Added `showApplyButton` prop to `EuiSuperDatePicker` ([#1399](https://github.com/elastic/eui/pull/1399)) |
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.
Changelog needs updating too
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.
LG, thanks!
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.
Changes LGTM and work as expected in docs
jenkins test this |
Summary
Kibana would like to include
EuiSuperDatePicker
within a UI that also contains a query bar. Showing theUpdate
button withinEuiSuperDatePicker
does not make sense in this case because there should be a single apply button for all components, not an apply button for each component.This PR adds the prop
showApplyButton
toEuiSuperDatePicker
. Set showApplyButton to false to immediately invoke onTimeChange for all start and end changes. This will allow parent components to embedEuiSuperDatePicker
into more complex UIs and design there ownApply
logic.Checklist