Skip to content

Commit

Permalink
feat: update add filter
Browse files Browse the repository at this point in the history
  • Loading branch information
nlatipov committed Feb 6, 2022
1 parent bfc0711 commit bf491d3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/plugins/data/public/ui/filter_bar/filter_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const FilterBarUI = React.memo(function FilterBarUI(props: Props) {
}

function onEditMultipleFiltersANDOR(selectedFilters: FilterGroup[], buildFilters: Filter[]) {
// debugger
const mappedFilters = mapAndFlattenFilters(buildFilters);
const mergedFilters = mappedFilters.map((filter, idx) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ export function AddFilterModal({
const subGroupId =
filtersOnGroup.length > 2
? localfilter?.subGroupId ?? 0
: (localfilter?.subGroupId ?? 0) + 1;
: (localfilter?.subGroupId ?? 0);
const updatedLocalFilter = {
...localfilter,
relationship: 'AND',
Expand All @@ -509,7 +509,6 @@ export function AddFilterModal({
(f) => f.id === localfilter.id && f.groupId === Number(groupId)
);
localFilters[idx] = updatedLocalFilter;
// debugger
setLocalFilters([
...localFilters,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ export function EditFilterModal({
const [selectedIndexPattern, setSelectedIndexPattern] = useState(
getIndexPatternFromFilter(filter, indexPatterns)
);
// debugger
const [addFilterMode, setAddFilterMode] = useState<string>(initialAddFilterMode ?? tabs[0].type);
const [customLabel, setCustomLabel] = useState<string>(filter.meta.alias || '');
const [queryDsl, setQueryDsl] = useState<string>(JSON.stringify(cleanFilter(filter), null, 2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ export const QueryBarTopRow = React.memo(
}

function onAddMultipleFiltersANDOR(selectedFilters: FilterGroup[], buildFilters: Filter[]) {
// debugger
const lastFilter: any = props.multipleFilters[props.multipleFilters.length - 1];
const mappedFilters = mapAndFlattenFilters(buildFilters);
// if (lastFilter !== undefined) lastFilter.relationship = 'AND';
Expand Down

0 comments on commit bf491d3

Please sign in to comment.