tsimport {useTableSelection} from '@astryxdesign/core/Table'
| Param | Type | Description |
|---|---|---|
getIsItemSelectedrequired | (item: T) => boolean | Returns whether the given item is currently selected. |
onSelectItemrequired | (event: {item: T; isSelected: boolean}) => void | Called when a row checkbox is toggled. isSelected is the new desired state. |
onSelectAllrequired | (event: {isAllSelected: boolean}) => void | Called when the select-all header checkbox is toggled. |
getIsAllSelectedrequired | () => boolean | Returns whether all selectable items are currently selected. |
getIsIndeterminate | () => boolean | Returns whether selection is partial (some but not all). Renders the select-all checkbox in indeterminate state. |
getIsItemSelectable | (item: T) => boolean (default: () => true) | Returns whether a row should show a checkbox. Non-selectable rows render nothing in the selection cell. |
getIsItemEnabled | (item: T) => boolean (default: () => true) | Returns whether a row checkbox is interactive. Disabled rows show a disabled checkbox. |