refactor: decouple DataTableControl (#20226)

This commit is contained in:
Yongjie Zhao
2022-06-03 09:52:58 +08:00
committed by GitHub
parent 32bb1ce3ff
commit a020f75a97
10 changed files with 133 additions and 163 deletions

View File

@@ -107,7 +107,7 @@ test('useTableColumns with no options', () => {
name: 'DataTableTemporalHeaderCell',
}),
props: expect.objectContaining({
originalFormattedTimeColumnIndex: -1,
onTimeColumnChange: expect.any(Function),
}),
}),
accessor: expect.any(Function),
@@ -135,7 +135,7 @@ test('useTableColumns with no options', () => {
test('useTableColumns with options', () => {
const hook = renderHook(() =>
useTableColumns(colnames, coltypes, data, undefined, [], {
useTableColumns(colnames, coltypes, data, undefined, true, {
col01: { Header: 'Header' },
}),
);
@@ -171,7 +171,7 @@ test('useTableColumns with options', () => {
name: 'DataTableTemporalHeaderCell',
}),
props: expect.objectContaining({
originalFormattedTimeColumnIndex: -1,
onTimeColumnChange: expect.any(Function),
}),
}),
accessor: expect.any(Function),