1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Don't clear searchUrlParam on every change (#3189)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-06-28 04:41:01 -04:00 committed by GitHub
parent 4e235a95a1
commit 8dda513b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -27,6 +27,7 @@ import { cssNames } from "../../utils";
import { Filter, pageFilters } from "./page-filters.store";
import { FilterIcon } from "./filter-icon";
import { Icon } from "../icon";
import { searchUrlParam } from "../input";
interface Props {
filters?: Filter[];
@ -41,7 +42,10 @@ export class PageFiltersList extends React.Component<Props> {
};
reset = () => pageFilters.reset();
remove = (filter: Filter) => pageFilters.removeFilter(filter);
remove = (filter: Filter) => {
pageFilters.removeFilter(filter);
searchUrlParam.clear();
};
renderContent() {
const { filters } = this.props;

View File

@ -83,10 +83,6 @@ export class PageFiltersStore {
if (filterCopy) this.filters.remove(filterCopy);
}
if (filter.type === FilterType.SEARCH) {
searchUrlParam.clear();
}
}
getByType(type: FilterType, value?: any): Filter {