Skip to content

Commit

Permalink
Fixes bugs with full screen filters (elastic#54792)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
2 people authored and jkelastic committed Jan 17, 2020
1 parent 06821a9 commit 5e66b39
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5e66b39

Please sign in to comment.