Introduce createTablePlugin

Summary: This diff exposes the createTablePlugin from flipper-plugin, so that createTablePlugin based plugins can be converted to Sandy as well

Reviewed By: jknoxville

Differential Revision: D28031227

fbshipit-source-id: 8e9c82da08a83fddab740b46be9917b6a1023117
This commit is contained in:
Michel Weststrate
2021-04-28 12:27:31 -07:00
committed by Facebook GitHub Bot
parent cf2405a466
commit 05bf55419f
11 changed files with 422 additions and 43 deletions

View File

@@ -19,6 +19,7 @@ import React from 'react';
import {tryGetFlipperLibImplementation} from '../../plugin/FlipperLib';
import {DataTableColumn} from './DataTable';
import {DataSource} from '../../state/DataSource';
import {toFirstUpper} from '../../utils/toFirstUpper';
const {Item, SubMenu} = Menu;
@@ -137,5 +138,5 @@ export function tableContextMenuFactory<T>(
function friendlyColumnTitle(column: DataTableColumn<any>): string {
const name = column.title || column.key;
return name[0].toUpperCase() + name.substr(1);
return toFirstUpper(name);
}