diff --git a/frontend/app/components/shared/CustomMetrics/FilterSeries/FilterSeries.tsx b/frontend/app/components/shared/CustomMetrics/FilterSeries/FilterSeries.tsx index 40214855c..6e1c0fc07 100644 --- a/frontend/app/components/shared/CustomMetrics/FilterSeries/FilterSeries.tsx +++ b/frontend/app/components/shared/CustomMetrics/FilterSeries/FilterSeries.tsx @@ -40,7 +40,7 @@ function FilterSeries(props: Props) { }); props.updateSeries(seriesIndex, { - ...series.toData(), + ...series, filter: { ...series.filter, filters: newFilters, diff --git a/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.css b/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.css index e2ce40ac0..a256fdcf3 100644 --- a/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.css +++ b/frontend/app/components/shared/Filters/FilterAutoComplete/FilterAutoComplete.css @@ -4,8 +4,9 @@ border-radius: 3px; display: flex; align-items: center; + background-color: white; & input { - height: 28px; + height: 24px; font-size: 13px !important; padding: 0 5px !important; border-top-left-radius: 3px; @@ -14,7 +15,7 @@ } & .right { - height: 28px; + height: 24px; display: flex; align-items: stretch; padding: 0; diff --git a/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx b/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx index 97e09d190..75ab72f3a 100644 --- a/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx +++ b/frontend/app/components/shared/Filters/FilterItem/FilterItem.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import FilterOperator from '../FilterOperator/FilterOperator'; +import FilterOperator from '../FilterOperator'; import FilterSelection from '../FilterSelection'; import FilterValue from '../FilterValue'; import { Icon } from 'UI'; @@ -12,51 +12,30 @@ interface Props { isFilter?: boolean; } function FitlerItem(props: Props) { - const { isFilter = false, filterIndex, filter, onUpdate } = props; + const { isFilter = false, filterIndex, filter } = props; const replaceFilter = (filter) => { - onUpdate(filter); + props.onUpdate({ ...filter, value: [""]}); }; - // const onAddValue = () => { - // const newValues = filter.value.concat("") - // onUpdate({ ...filter, value: newValues }) - // } - - // const onRemoveValue = (valueIndex) => { - // const newValues = filter.value.filter((_, _index) => _index !== valueIndex) - // onUpdate({ ...filter, value: newValues }) - // } - - // const onSelect = (e, item, valueIndex) => { - // const newValues = filter.value.map((_, _index) => { - // if (_index === valueIndex) { - // return item.value; - // } - // return _; - // }) - // onUpdate({ ...filter, value: newValues }) - // } - const onOperatorChange = (e, { name, value }) => { - console.log('onOperatorChange', name, value) - onUpdate({ ...filter, operator: value }) + props.onUpdate({ ...filter, operator: value }) } return ( -