Function useGridSelection
- useGridSelection(__namedParameters?): {
deselectAll: (() => void);
gridProps: {
onSelectedRows: ((rowIds: string[]) => void);
selectedRows: string[];
};
selectedRows: string[];
setSelectedRows: Dispatch<SetStateAction<string[]>>;
} Parameters
- __namedParameters: Partial<IParams> = {}
Returns {
deselectAll: (() => void);
gridProps: {
onSelectedRows: ((rowIds: string[]) => void);
selectedRows: string[];
};
selectedRows: string[];
setSelectedRows: Dispatch<SetStateAction<string[]>>;
}
- An object containing the following properties:
- selectedRows: Array of selected row IDs.
- gridProps: Object with properties for grid selection:
- selectedRows: Array of selected row IDs.
- onSelectedRows: Function to handle selected row IDs.
- deselectAll: Function to clear all selected rows.
deselectAll: (() => void)
Readonly
gridProps: {
onSelectedRows: ((rowIds: string[]) => void);
selectedRows: string[];
}
Readonly
onSelectedRows: ((rowIds: string[]) => void)
- (rowIds): void
Returns void
selectedRows: string[]
selectedRows: string[]
setSelectedRows: Dispatch<SetStateAction<string[]>>
Hook for managing grid selection.