mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
feat: set window size (#405)
This commit is contained in:
4
src/hooks/useTable.tsx
vendored
4
src/hooks/useTable.tsx
vendored
@@ -8,8 +8,8 @@ type rowSelectionOptions = {
|
||||
key: 'id' | string;
|
||||
rowType: 'id' | 'row' | 'all';
|
||||
};
|
||||
export function useTableRowSelection(options: Partial<rowSelectionOptions> = {}) {
|
||||
const { key = 'id', rowType = 'id' } = options;
|
||||
export function useTableRowSelection(options?: Partial<rowSelectionOptions>) {
|
||||
const { key = 'id', rowType = 'id' } = options || {};
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
const [selectedRowIDs, setSelectedRowIDs] = useState<string[]>([]);
|
||||
const [selectedRows, setSelectedRows] = useState<Record<string | symbol, any>[]>([]);
|
||||
|
||||
Reference in New Issue
Block a user