TableNG: Fix filtering bug (#105334)

fix: tableNG filtering
This commit is contained in:
Alex Spencer
2025-05-20 10:10:49 -07:00
committed by GitHub
parent 082b46067c
commit ce3f485593

View File

@ -280,8 +280,11 @@ export function TableNG(props: TableNGProps) {
// Helper function to get displayed value // Helper function to get displayed value
const getDisplayedValue = (row: TableRow, key: string) => { const getDisplayedValue = (row: TableRow, key: string) => {
const field = props.data.fields.find((field) => field.name === key)!; const field = props.data.fields.find((field) => getDisplayName(field) === key);
const displayedValue = formattedValueToString(field.display!(row[key])); if (!field || !field.display) {
return '';
}
const displayedValue = formattedValueToString(field.display(row[key]));
return displayedValue; return displayedValue;
}; };