-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply React logic to HighTable selection
I try to follow the same logic as https://react.dev/reference/react-dom/components/input and https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components The selection in HighTable is controlled, or uncontrolled, and it cannot be changed once the component has been created. Four modes: * - controlled (selection and onSelectionChange are defined): the parent controls the selection and receives the user interactions. No local state. * - controlled read-only (selection is defined, onSelectionChange is undefined): the parent controls the selection and the user interactions are disabled. No local state. * - uncontrolled (selection is undefined, onSelectionChange is defined): the component controls the selection and the user interactions. Local state. * - disabled (selection and onSelectionChange are undefined): the selection is hidden and the user interactions are disabled. No local state. Next steps: - do the same for orderBy - merge ControlledHighTable back to HighTable - fix tests - handle selection with keyboard (onChange on checkboxes)
- Loading branch information
Showing
3 changed files
with
135 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters