mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
bf114f6986
commit
825e93b5c4
2 changed files with 13 additions and 2 deletions
|
@ -42,7 +42,16 @@ export const TimePickerPopover: FunctionComponent<Props> = ({ from, to, onSelect
|
|||
anchorClassName="canvasTimePickerPopover__anchor"
|
||||
button={button}
|
||||
>
|
||||
{() => <TimePicker from={from} to={to} onSelect={onSelect} />}
|
||||
{({ closePopover }) => (
|
||||
<TimePicker
|
||||
from={from}
|
||||
to={to}
|
||||
onSelect={(...args) => {
|
||||
onSelect(...args);
|
||||
closePopover();
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Popover>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -58,7 +58,9 @@ function selectorFactory(dispatch) {
|
|||
export const ElementWrapper = compose(
|
||||
connectAdvanced(selectorFactory),
|
||||
withPropsOnChange(
|
||||
(props, nextProps) => !isEqual(props.element, nextProps.element),
|
||||
(props, nextProps) =>
|
||||
!isEqual(props.element, nextProps.element) ||
|
||||
!isEqual(props.selectedPage, nextProps.selectedPage),
|
||||
props => {
|
||||
const { element, createHandlers } = props;
|
||||
const handlers = createHandlers(element, props.selectedPage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue