Skip to content

Commit 3780546

Browse files
committed
feat: NodeListSearchFilter - integrate GroupedFilterSelectPicker
1 parent 534e9da commit 3780546

File tree

7 files changed

+148
-198
lines changed

7 files changed

+148
-198
lines changed

src/components/ResourceBrowser/Constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ export const NODE_SEARCH_KEYS_TO_OBJECT_KEYS: Record<
335335
(typeof NODE_LIST_HEADERS_TO_KEY_MAP)[keyof typeof NODE_LIST_HEADERS_TO_KEY_MAP]
336336
> = {
337337
[NODE_SEARCH_KEYS.LABEL]: 'labels',
338-
[NODE_SEARCH_KEYS.NAME]: 'name',
339338
[NODE_SEARCH_KEYS.NODE_GROUP]: 'nodeGroup',
340339
}
341340

src/components/ResourceBrowser/ResourceBrowser.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
.resource-list-container {
6767
.node-listing-search-container {
6868
display: grid;
69-
grid-template-columns: auto 160px 1px 180px;
69+
grid-template-columns: 1fr auto 160px 1px 180px;
7070
column-gap: 8px;
7171
}
7272

src/components/ResourceBrowser/ResourceList/K8SResourceList.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ const K8SResourceListViewWrapper = ({
9999
allColumns={allColumns}
100100
searchParams={restProps}
101101
rows={rows}
102+
searchKey={searchKey}
103+
handleSearch={handleSearch}
102104
/>
103105
) : (
104106
<ResourceFilterOptions
@@ -220,8 +222,10 @@ export const K8SResourceList = ({
220222
)
221223

222224
const tableFilter: K8sResourceListTableProps['filter'] = (row, filterData) => {
225+
let nodeFilters = true
226+
223227
if (isNodeListing) {
224-
return isItemASearchMatchForNodeListing(row.data, filterData)
228+
nodeFilters = isItemASearchMatchForNodeListing(row.data, filterData)
225229
}
226230

227231
const isSearchMatch =
@@ -241,7 +245,7 @@ export const K8SResourceList = ({
241245
)
242246
}
243247

244-
return isSearchMatch
248+
return isSearchMatch && nodeFilters
245249
}
246250

247251
const getDefaultSortKey = () => {

0 commit comments

Comments
 (0)