VSN-2002 : Implementing the selection feature via a dedicated selection column controlling total - partial & individual prepared passengers items selection.
Implementing the Selection Feature via a Dedicated Selection Column Controlling Total, Partial, and Individual Prepared Passenger Selection
Overview
This merge request introduces the full selection feature for the prepared passengers table.
It adds a dedicated selection column, implements the underlying selection state and utilities, and integrates the new selection workflow into the table head, rows, and list view.
The feature supports:
- Individual row selection
- Select-all
- Partial selection state
- Consistent propagation of selection utilities across components
Changes Summary
1. feat(selection) : Selected passengers
- Added state to store identifiers of selected prepared passengers (
selectedRows).
2. feat(selection) : Handling methods
- Implemented selection methods to support individual and collective toggling:
toggleRowtoggleAll
3. feat(selection) : Selection flags
- Added flags determining the selection state:
allSelectedpartiallySelected
4. feat(selection) : Exposing utilities
- Exported selection variables and handlers from the custom hook to make them available across the view.
5. refactor(head) : Table head adaptation
- Added a new column dedicated exclusively to selection in the prepared passengers table head.
6. refactor(filters) : Initial sort fix
- Updated default filters to sort by
firstNameto avoid trying to sort by the selection column (non-sortable).
7. feat(view) : Utilities retrieval
- Retrieved and integrated the selection handlers and flags within the main list view.
8. feat(row) : Row props
- Added props for passing selection utilities to each prepared passenger row.
9. feat(row) : Selection checkbox
- Added a checkbox cell to the passenger row for individual selection actions.
10. feat(selection) : Invocation
- Passed selection utilities correctly down to each row component.
11. feat(manager) : Table manager
- Integrated selection-related props into the table manager for constructing the updated table head.
12. feat(head) : Table head props
- Transmitted selection props to the head component to support dynamic header behavior.
13. feat(head) : Selection head cell
- Dynamically rendered a checkbox in the selection column header to support select-all and partial-selection visual state.
14. feat(invocations) : Final integration
- Fully propagated selection utilities to:
- The list view
- The table manager
- The table head
Technical Impact
- The prepared passengers table now supports individual, partial, and total selection in a consistent way.
- Selection state and logic are centralized through a custom hook.
- The table structure was adapted to support a new selection column.
- Ensures compatibility with existing filters and view architecture.
Testing
- Verified that selecting a row updates
selectedRows. - Verified that the select-all checkbox correctly marks:
- All selected
- None selected
- Partial selection (indeterminate state)
- Confirmed that selection state is correctly propagated to row and head components.
- Ensured the system behaves correctly when lists are filtered or updated.
Closes VSN-2002