Fix table params

This commit is contained in:
jeffvli 2023-01-15 16:34:30 -08:00
parent 5614ad54f2
commit dbc29568ca
3 changed files with 3 additions and 21 deletions

View File

@ -197,6 +197,7 @@ export const PlaylistDetailSongListContent = ({ tableRef }: PlaylistDetailConten
key={`table-${page.display}-${page.table.rowHeight}-${server?.id}`}
ref={tableRef}
alwaysShowHorizontalScroll
autoFitColumns={page.table.autoFit}
columnDefs={columnDefs}
getRowId={(data) => data.data.uniqueId}
infiniteInitialRowCount={checkPlaylistList.data?.totalRecordCount || 1}

View File

@ -185,13 +185,8 @@ export const PlaylistListContent = ({ tableRef }: PlaylistListContentProps) => {
key={`table-${page.display}-${page.table.rowHeight}-${server?.id}`}
ref={tableRef}
alwaysShowHorizontalScroll
animateRows
maintainColumnOrder
suppressCopyRowsToClipboard
suppressMoveWhenRowDragging
suppressPaginationPanel
suppressRowDrag
suppressScrollOnNewData
autoFitColumns={page.table.autoFit}
blockLoadDebounceMillis={200}
cacheBlockSize={200}
cacheOverflowSize={1}

View File

@ -57,14 +57,6 @@ export const SongListContent = ({ itemCount, tableRef }: SongListContentProps) =
[page.table.columns],
);
const defaultColumnDefs: ColDef = useMemo(() => {
return {
lockPinned: true,
lockVisible: true,
resizable: true,
};
}, []);
const onGridReady = useCallback(
(params: GridReadyEvent) => {
const dataSource: IDatasource = {
@ -180,18 +172,12 @@ export const SongListContent = ({ itemCount, tableRef }: SongListContentProps) =
key={`table-${page.display}-${page.table.rowHeight}-${server?.id}`}
ref={tableRef}
alwaysShowHorizontalScroll
animateRows
maintainColumnOrder
suppressCopyRowsToClipboard
suppressMoveWhenRowDragging
suppressPaginationPanel
suppressRowDrag
suppressScrollOnNewData
autoFitColumns={page.table.autoFit}
blockLoadDebounceMillis={200}
cacheBlockSize={500}
cacheOverflowSize={1}
columnDefs={columnDefs}
defaultColDef={defaultColumnDefs}
enableCellChangeFlash={false}
getRowId={(data) => data.data.id}
infiniteInitialRowCount={itemCount || 100}