Change UpdatePage Reducer

Summary: The different is small after the change from storing pre-rendered data to raw data. Hence, the diff changes it to match `currentPage` to ease the assignment (used in next diffs)

Reviewed By: jknoxville

Differential Revision: D21788245

fbshipit-source-id: 87bdbce33f0615bf31878797a74fce5d5969db7b
This commit is contained in:
Chaiwat Ekkaewnumchai
2020-06-02 01:44:21 -07:00
committed by Facebook GitHub Bot
parent d6b617a952
commit fe17ddce1a

View File

@@ -169,14 +169,7 @@ type UpdateViewModeEvent = {
type UpdatePageEvent = {
type: 'UpdatePage';
databaseId: number;
table: string;
columns: Array<string>;
values: Array<Array<Value>>;
start: number;
count: number;
total: number;
};
} & Page;
type UpdateStructureEvent = {
type: 'UpdateStructure';
@@ -481,11 +474,7 @@ export default class DatabasesPlugin extends FlipperPlugin<
): DatabasesPluginState => {
return {
...state,
currentPage: {
rows: event.values,
highlightedRows: [],
...event,
},
currentPage: event,
};
},
],
@@ -817,10 +806,11 @@ export default class DatabasesPlugin extends FlipperPlugin<
databaseId: databaseId,
table: table,
columns: data.columns,
values: data.values,
rows: data.values,
start: data.start,
count: data.count,
total: data.total,
highlightedRows: [],
});
})
.catch((e) => {