Function useListSelection
- useListSelection(__namedParameters?): {
deselectAll: (() => void);
listProps: {
onSelectedRows: ((rowIds: RowId[]) => void);
selectedRows: RowId[];
};
selectedRows: RowId[];
setSelectedRows: Dispatch<SetStateAction<RowId[]>>;
} Parameters
- __namedParameters: Partial<IParams> = {}
Returns {
deselectAll: (() => void);
listProps: {
onSelectedRows: ((rowIds: RowId[]) => void);
selectedRows: RowId[];
};
selectedRows: RowId[];
setSelectedRows: Dispatch<SetStateAction<RowId[]>>;
}
- An object containing the selected rows, list props, and a function to deselect all rows.
deselectAll: (() => void)
Readonly
listProps: {
onSelectedRows: ((rowIds: RowId[]) => void);
selectedRows: RowId[];
}
Readonly
onSelectedRows: ((rowIds: RowId[]) => void)
- (rowIds): void
Returns void
selectedRows: RowId[]
selectedRows: RowId[]
setSelectedRows: Dispatch<SetStateAction<RowId[]>>
A custom hook that manages the selection of rows in a list.