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
|
@ -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…
Reference in a new issue