Refactored DataView to be the primary data driver for DataTable instead
Summary: In order to accomplish multi-panel mode, we need to use multiple data views on the same data source so that the filters can be applied differently, etc. This diff serves to refactor DataTable and some of its associated classes to use DataView as the primary driver for data management. Additionally, the diff refactored the state to allow multi-paneling to be on the DataPanel layer instead of the DataTable layer for ease of usage This is the last diff of the larger stack which introduces the multi-panel mode feature. A possible next step could be allowing infinite(up to a certain limit) panels to be populated. Changelog: Introduced side by side view feature for `DataTable`. There is now a new boolean for `DataTable` props called `enableMultiPanels`. If this is passed in, then the table will have an option to open a different "side panel" using a completely different dataview which allows different filters, searches, etc. Reviewed By: mweststrate Differential Revision: D37685390 fbshipit-source-id: 51e35f59da1ceba07ba8d379066970b57ab1734e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
96a23495c9
commit
3fbf1215ec
@@ -94,6 +94,7 @@ test('it supports deeplink and select nodes + navigating to bottom', async () =>
|
||||
sendLogEntry(entry3);
|
||||
|
||||
expect(instance.tableManagerRef).not.toBeUndefined();
|
||||
expect(instance.tableManagerRef.current).not.toBeNull();
|
||||
expect(instance.tableManagerRef.current?.getSelectedItems()).toEqual([]);
|
||||
|
||||
act(() => {
|
||||
|
||||
@@ -12,13 +12,13 @@ import {
|
||||
DeviceLogEntry,
|
||||
usePlugin,
|
||||
createDataSource,
|
||||
DataTable,
|
||||
DataTableColumn,
|
||||
theme,
|
||||
DataTableManager,
|
||||
createState,
|
||||
useValue,
|
||||
DataFormatter,
|
||||
DataTable,
|
||||
} from 'flipper-plugin';
|
||||
import {
|
||||
PlayCircleOutlined,
|
||||
@@ -227,6 +227,7 @@ export function Component() {
|
||||
dataSource={plugin.rows}
|
||||
columns={plugin.columns}
|
||||
enableAutoScroll
|
||||
enableMultiPanels
|
||||
onRowStyle={getRowStyle}
|
||||
enableHorizontalScroll={false}
|
||||
extraActions={
|
||||
|
||||
Reference in New Issue
Block a user