mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove Namespace filter from ItemListLayout (#2952)
This commit is contained in:
1 parent
d21f99e609
commit
cb4a7497dd
5 files changed
+2
-162
No files matched your search
@@ -35,7 +35,6 @@ import type { ItemObject, ItemStore } from "../../item.store";
|
||||
import { SearchInputUrl } from "../input";
|
||||
import { Filter, FilterType, pageFilters } from "./page-filters.store";
|
||||
import { PageFiltersList } from "./page-filters-list";
|
||||
import { PageFiltersSelect } from "./page-filters-select";
|
||||
import { ThemeStore } from "../../theme.store";
|
||||
import { MenuActions } from "../menu/menu-actions";
|
||||
import { MenuItem } from "../menu";
|
||||
@@ -179,16 +178,6 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
|
||||
return items;
|
||||
},
|
||||
|
||||
[FilterType.NAMESPACE]: items => {
|
||||
const filterValues = pageFilters.getValues(FilterType.NAMESPACE);
|
||||
|
||||
if (filterValues.length > 0) {
|
||||
return items.filter(item => filterValues.includes(item.getNs()));
|
||||
}
|
||||
|
||||
return items;
|
||||
},
|
||||
};
|
||||
|
||||
@computed get isReady() {
|
||||
@@ -401,14 +390,7 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
const placeholders: IHeaderPlaceholders = {
|
||||
title: <h5 className="title">{title}</h5>,
|
||||
info: this.renderInfo(),
|
||||
filters: (
|
||||
<>
|
||||
{showNamespaceSelectFilter && <NamespaceSelectFilter />}
|
||||
<PageFiltersSelect allowEmpty disableFilters={{
|
||||
[FilterType.NAMESPACE]: true, // namespace-select used instead
|
||||
}} />
|
||||
</>
|
||||
),
|
||||
filters: showNamespaceSelectFilter && <NamespaceSelectFilter />,
|
||||
search: <SearchInputUrl />,
|
||||
};
|
||||
let header = this.renderHeaderContent(placeholders);
|
||||
|
||||
Reference in new issue
Block a user