moving tables to react-window

Summary:
Tables were using a custom virtualization, which wasn't as performant as other solutions out there. In this diff, the table component is reworked for performance.
- removes `Table` component, because it was never used standalone, `ManagedTable` is what all plugins used
- uses `react-window` for `ManagedTable`
- reworks table highlighting and arrow-navigation to work with the new virtualization
- moves actual filtering out of `ManagedTable` into `Searchable` component for a better separation of concerns.

Reviewed By: jknoxville

Differential Revision: D9447721

fbshipit-source-id: 15eb2eb55eed9f49a0cb1ccfb2d748b3672fa898
This commit is contained in:
Daniel Büchele
2018-08-23 04:43:51 -07:00
committed by Facebook Github Bot
parent 33f34650df
commit 1891e2c869
13 changed files with 611 additions and 1253 deletions

View File

@@ -43,7 +43,7 @@ type Electron$MenuItemOptions = {
menuItem: Electron$MenuItem,
browserWindow: Object,
event: Object,
) => void,
) => mixed,
role?: Electron$MenuRoles,
type?: Electron$MenuType,
label?: string,

View File

@@ -0,0 +1,39 @@
// flow-typed signature: 914da65c76e12730f3b4e60d17889885
// flow-typed version: <<STUB>>/react-virtualized-auto-sizer_v1.0.2/flow_v0.76.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-virtualized-auto-sizer'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'react-virtualized-auto-sizer' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'react-virtualized-auto-sizer/dist/index.cjs' {
declare module.exports: any;
}
declare module 'react-virtualized-auto-sizer/dist/index.esm' {
declare module.exports: any;
}
// Filename aliases
declare module 'react-virtualized-auto-sizer/dist/index.cjs.js' {
declare module.exports: $Exports<'react-virtualized-auto-sizer/dist/index.cjs'>;
}
declare module 'react-virtualized-auto-sizer/dist/index.esm.js' {
declare module.exports: $Exports<'react-virtualized-auto-sizer/dist/index.esm'>;
}

39
flow-typed/npm/react-window_vx.x.x.js vendored Normal file
View File

@@ -0,0 +1,39 @@
// flow-typed signature: 351408bd2a4f82fae81f253ee1947834
// flow-typed version: <<STUB>>/react-window_v1.1.1/flow_v0.76.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-window'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'react-window' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'react-window/dist/index.cjs' {
declare module.exports: any;
}
declare module 'react-window/dist/index.esm' {
declare module.exports: any;
}
// Filename aliases
declare module 'react-window/dist/index.cjs.js' {
declare module.exports: $Exports<'react-window/dist/index.cjs'>;
}
declare module 'react-window/dist/index.esm.js' {
declare module.exports: $Exports<'react-window/dist/index.esm'>;
}