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:
parent
4e235a95a1
commit
8dda513b79
@ -27,6 +27,7 @@ import { cssNames } from "../../utils";
|
|||||||
import { Filter, pageFilters } from "./page-filters.store";
|
import { Filter, pageFilters } from "./page-filters.store";
|
||||||
import { FilterIcon } from "./filter-icon";
|
import { FilterIcon } from "./filter-icon";
|
||||||
import { Icon } from "../icon";
|
import { Icon } from "../icon";
|
||||||
|
import { searchUrlParam } from "../input";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
filters?: Filter[];
|
filters?: Filter[];
|
||||||
@ -41,7 +42,10 @@ export class PageFiltersList extends React.Component<Props> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
reset = () => pageFilters.reset();
|
reset = () => pageFilters.reset();
|
||||||
remove = (filter: Filter) => pageFilters.removeFilter(filter);
|
remove = (filter: Filter) => {
|
||||||
|
pageFilters.removeFilter(filter);
|
||||||
|
searchUrlParam.clear();
|
||||||
|
};
|
||||||
|
|
||||||
renderContent() {
|
renderContent() {
|
||||||
const { filters } = this.props;
|
const { filters } = this.props;
|
||||||
|
|||||||
@ -83,10 +83,6 @@ export class PageFiltersStore {
|
|||||||
|
|
||||||
if (filterCopy) this.filters.remove(filterCopy);
|
if (filterCopy) this.filters.remove(filterCopy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter.type === FilterType.SEARCH) {
|
|
||||||
searchUrlParam.clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getByType(type: FilterType, value?: any): Filter {
|
getByType(type: FilterType, value?: any): Filter {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user