Skip to content

Commit

Permalink
Merge pull request #2086 from headlamp-k8s/table-search-fix
Browse files Browse the repository at this point in the history
frontend: Fix table search when some values are undefined
  • Loading branch information
joaquimrocha authored Jun 27, 2024
2 parents e32b9c1 + b62dcf2 commit c8ac575
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/common/Resource/ResourceTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function ResourceTableContent<RowItem>(props: ResourceTableProps<RowItem>) {
};

if ('getValue' in column) {
mrtColumn.accessorFn = column.getValue;
mrtColumn.accessorFn = item => column.getValue?.(item) ?? '';
} else if ('getter' in column) {
mrtColumn.accessorFn = column.getter;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,12 @@
Class Name
</div>
<span
aria-label="Sort by Class Name descending"
aria-label="Sort by Class Name ascending"
class="MuiBadge-root css-1c32n2y-MuiBadge-root"
data-mui-internal-clone-element="true"
>
<span
aria-label="Sort by Class Name descending"
aria-label="Sort by Class Name ascending"
class="MuiButtonBase-root MuiTableSortLabel-root Mui-active css-118d58w-MuiButtonBase-root-MuiTableSortLabel-root"
role="button"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,12 @@
Taints
</div>
<span
aria-label="Sort by Taints descending"
aria-label="Sort by Taints ascending"
class="MuiBadge-root css-1c32n2y-MuiBadge-root"
data-mui-internal-clone-element="true"
>
<span
aria-label="Sort by Taints descending"
aria-label="Sort by Taints ascending"
class="MuiButtonBase-root MuiTableSortLabel-root Mui-active css-118d58w-MuiButtonBase-root-MuiTableSortLabel-root"
role="button"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@
Allow Volume Expansion
</div>
<span
aria-label="Sort by Allow Volume Expansion descending"
aria-label="Sort by Allow Volume Expansion ascending"
class="MuiBadge-root css-1c32n2y-MuiBadge-root"
data-mui-internal-clone-element="true"
>
<span
aria-label="Sort by Allow Volume Expansion descending"
aria-label="Sort by Allow Volume Expansion ascending"
class="MuiButtonBase-root MuiTableSortLabel-root Mui-active css-118d58w-MuiButtonBase-root-MuiTableSortLabel-root"
role="button"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@
Allow Volume Expansion
</div>
<span
aria-label="Sort by Allow Volume Expansion descending"
aria-label="Sort by Allow Volume Expansion ascending"
class="MuiBadge-root css-1c32n2y-MuiBadge-root"
data-mui-internal-clone-element="true"
>
<span
aria-label="Sort by Allow Volume Expansion descending"
aria-label="Sort by Allow Volume Expansion ascending"
class="MuiButtonBase-root MuiTableSortLabel-root Mui-active css-118d58w-MuiButtonBase-root-MuiTableSortLabel-root"
role="button"
tabindex="0"
Expand Down

0 comments on commit c8ac575

Please sign in to comment.