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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
03c2828630
commit
4d0a5ff42b
@@ -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<AugmentedFrameworkEvent>),
|
||||
);
|
||||
|
||||
@@ -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({}),
|
||||
|
||||
Reference in New Issue
Block a user