Export power search enabled components and types by default

Summary: Provides power search typings to all users by default

Reviewed By: LukeDefeo

Differential Revision: D51306600

fbshipit-source-id: c1f0d318d8b6953dd02af16d2c51abbf0e6e9590
This commit is contained in:
Andrey Goncharov
2023-11-15 05:00:21 -08:00
committed by Facebook GitHub Bot
parent b34718ac32
commit bfc4e959bc
7 changed files with 125 additions and 168 deletions

View File

@@ -13,10 +13,10 @@ import {
usePlugin,
createDataSource,
dataTablePowerSearchOperators,
_DataTableColumnWithPowerSearch,
_DataTableWithPowerSearch,
DataTableColumn,
DataTable,
theme,
_DataTableWithPowerSearchManager,
DataTableManager,
createState,
useValue,
DataFormatter,
@@ -48,7 +48,7 @@ const logLevelEnumLabels = Object.entries(logTypes).reduce(
function createColumnConfig(
_os: 'iOS' | 'Android' | 'Metro',
): _DataTableColumnWithPowerSearch<ExtendedLogEntry>[] {
): DataTableColumn<ExtendedLogEntry>[] {
return [
{
key: 'type',
@@ -153,7 +153,7 @@ export function devicePlugin(client: DevicePluginClient) {
});
const isPaused = createState(true);
const tableManagerRef = createRef<
undefined | _DataTableWithPowerSearchManager<ExtendedLogEntry>
undefined | DataTableManager<ExtendedLogEntry>
>();
client.onDeepLink((payload: unknown) => {
@@ -264,7 +264,7 @@ export function Component() {
const plugin = usePlugin(devicePlugin);
const paused = useValue(plugin.isPaused);
return (
<_DataTableWithPowerSearch<ExtendedLogEntry>
<DataTable<ExtendedLogEntry>
dataSource={plugin.rows}
columns={plugin.columns}
enableAutoScroll