diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/range_value_input.tsx b/src/plugins/unified_search/public/filter_bar/filter_editor/range_value_input.tsx index 2e371da5abfef..4f35d4a7f2d81 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_editor/range_value_input.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_editor/range_value_input.tsx @@ -54,14 +54,14 @@ function RangeValueInputUI(props: Props) { if (typeof value !== 'string' && typeof value !== 'number') { throw new Error('Range params must be a string or number'); } - props.onChange({ from: value, to: get(props, 'value.to') }); + props.onChange({ from: value === '' ? undefined : value, to: get(props, 'value.to') }); }; const onToChange = (value: string | number | boolean) => { if (typeof value !== 'string' && typeof value !== 'number') { throw new Error('Range params must be a string or number'); } - props.onChange({ from: get(props, 'value.from'), to: value }); + props.onChange({ from: get(props, 'value.from'), to: value === '' ? undefined : value }); }; return ( diff --git a/src/plugins/unified_search/public/filters_builder/filter_item/operator_input.tsx b/src/plugins/unified_search/public/filters_builder/filter_item/operator_input.tsx index 0945fbc1c4d08..45e32f86c4b90 100644 --- a/src/plugins/unified_search/public/filters_builder/filter_item/operator_input.tsx +++ b/src/plugins/unified_search/public/filters_builder/filter_item/operator_input.tsx @@ -59,6 +59,7 @@ export function OperatorInput({ singleSelection={{ asPlainText: true }} isClearable={false} data-test-subj="filterOperatorList" + inputPopoverProps={{ panelMinWidth: 180 }} /> ); }