Add string_matches_exactly operator
Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7 Reviewed By: lblasa Differential Revision: D49230149 fbshipit-source-id: 7d66733d0ff311a82f9bc5673a2fb204d3ae6a9a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3206649a29
commit
113e2a90ad
@@ -26,6 +26,11 @@ export const dataTablePowerSearchOperators = {
|
|||||||
key: 'string_not_contains',
|
key: 'string_not_contains',
|
||||||
valueType: 'STRING',
|
valueType: 'STRING',
|
||||||
}),
|
}),
|
||||||
|
string_matches_exactly: () => ({
|
||||||
|
label: 'is',
|
||||||
|
key: 'string_matches_exactly',
|
||||||
|
valueType: 'STRING',
|
||||||
|
}),
|
||||||
} satisfies {
|
} satisfies {
|
||||||
[key: string]: (...args: any[]) => OperatorConfig;
|
[key: string]: (...args: any[]) => OperatorConfig;
|
||||||
};
|
};
|
||||||
@@ -43,4 +48,6 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
|
|||||||
!(value as string)
|
!(value as string)
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes((searchValue as string).toLowerCase()),
|
.includes((searchValue as string).toLowerCase()),
|
||||||
|
string_matches_exactly: (operator, searchValue, value) =>
|
||||||
|
value === searchValue,
|
||||||
} satisfies PowerSearchOperatorProcessorConfig;
|
} satisfies PowerSearchOperatorProcessorConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user