From 4d0a5ff42b0eebc3fecaf4793015764f4916d11b Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Wed, 8 Nov 2023 10:30:55 -0800 Subject: [PATCH] Change how custom columsn work Summary: Previously the render function was selecting the data from the paylaod object, this mean what was on screen and waht powersearch saw was diffferent. Now we supply a dotted key path and remove this from render, power search operator also uses this dotted key path so the search works changelog: UIdebugger added powersearch operators to Framework event table Reviewed By: aigoncharov Differential Revision: D51113095 fbshipit-source-id: 3c951c2a8a7a0a35e0aa79a194b979b699f83008 --- .../ui-debugger/components/FrameworkEventsTable.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/desktop/plugins/public/ui-debugger/components/FrameworkEventsTable.tsx b/desktop/plugins/public/ui-debugger/components/FrameworkEventsTable.tsx index 2ce268bc2..fa05a353b 100644 --- a/desktop/plugins/public/ui-debugger/components/FrameworkEventsTable.tsx +++ b/desktop/plugins/public/ui-debugger/components/FrameworkEventsTable.tsx @@ -90,10 +90,9 @@ export function FrameworkEventsTable({ const customColumns = [...customColumnKeys].map( (customKey: string) => ({ - key: customKey, + key: `payload.${customKey}` as any, title: startCase(customKey), - onRender: (row: AugmentedFrameworkEvent) => row.payload?.[customKey], - powerSearchConfig: enumLikeString, + powerSearchConfig: stringConfig, } as DataTableColumn), ); @@ -169,12 +168,6 @@ const stringConfig = [ ]; const idConfig = [dataTablePowerSearchOperators.int_equals()]; -//todo replace with auto mode -const enumLikeString = [ - dataTablePowerSearchOperators.string_matches_exactly(true), - dataTablePowerSearchOperators.string_not_matches_exactly(true), -]; - const inferredEnum = [ dataTablePowerSearchOperators.enum_set_is_any_of({}), dataTablePowerSearchOperators.enum_is({}),