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 <elasticmachine@users.noreply.github.com>
  • Loading branch information
Corey Robertson and elasticmachine committed Jan 16, 2020
1 parent 922117d commit 84f81e3
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 84f81e3

Please sign in to comment.