zhaoyongjie commented on a change in pull request #17166:
URL: https://github.com/apache/superset/pull/17166#discussion_r733333563
##########
File path: superset-frontend/src/explore/components/DataTableControl/index.tsx
##########
@@ -108,8 +105,7 @@ export const useFilteredTableData = (
if (!data?.length) {
return [];
}
- const formattedData = applyFormattingToTabularData(data);
- return formattedData.filter((row: Record<string, any>) =>
+ return data.filter((row: Record<string, any>) =>
Object.values(row).some(value =>
value?.toString().toLowerCase().includes(filterText.toLowerCase()),
),
Review comment:
a bit performance optimization, could we process the `row of data`
before calling `useFilteredTableData`? (in the other words, pre-process every
cell into string)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]