Skip to content

Commit 825e93b

Browse files
Corey Robertsonelasticmachine
andauthored
Fixes bugs with full screen filters (#54792) (#55102)
Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
1 parent bf114f6 commit 825e93b

File tree

2 files changed

+13
-2
lines changed
  • x-pack/legacy/plugins/canvas

2 files changed

+13
-2
lines changed

x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/time_filter/components/time_picker_popover/time_picker_popover.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ export const TimePickerPopover: FunctionComponent<Props> = ({ from, to, onSelect
4242
anchorClassName="canvasTimePickerPopover__anchor"
4343
button={button}
4444
>
45-
{() => <TimePicker from={from} to={to} onSelect={onSelect} />}
45+
{({ closePopover }) => (
46+
<TimePicker
47+
from={from}
48+
to={to}
49+
onSelect={(...args) => {
50+
onSelect(...args);
51+
closePopover();
52+
}}
53+
/>
54+
)}
4655
</Popover>
4756
);
4857
};

x-pack/legacy/plugins/canvas/public/components/element_wrapper/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ function selectorFactory(dispatch) {
5858
export const ElementWrapper = compose(
5959
connectAdvanced(selectorFactory),
6060
withPropsOnChange(
61-
(props, nextProps) => !isEqual(props.element, nextProps.element),
61+
(props, nextProps) =>
62+
!isEqual(props.element, nextProps.element) ||
63+
!isEqual(props.selectedPage, nextProps.selectedPage),
6264
props => {
6365
const { element, createHandlers } = props;
6466
const handlers = createHandlers(element, props.selectedPage);

0 commit comments

Comments
 (0)