WheelPickerWrapper is a container component that groups multiple WheelPicker components together and enables seamless keyboard navigation between them using arrow keys.
Props
Child elements to be rendered inside the wrapper. Typically contains multiple
WheelPicker components.Additional CSS class name for the wrapper element. Use this to add custom styling to the container.
Functionality
WheelPickerWrapper provides the following features:
Keyboard Navigation Between Pickers
When anyWheelPicker inside the wrapper is focused, you can navigate between pickers using:
- Arrow Left: Move focus to the previous picker
- Arrow Right: Move focus to the next picker
Focus Management
The wrapper manages focus state across all child pickers:- Only one picker can be focused at a time
- The focused picker receives keyboard events
- Tab index is automatically managed to ensure proper tab order
Usage Examples
Basic Time Picker
Date Picker with Month, Day, and Year
Styled Picker Group
Without Wrapper
You can useWheelPicker components without a wrapper if you don’t need keyboard navigation between pickers:
Implementation Details
The wrapper uses React Context internally to:- Register each child
WheelPickercomponent - Track which picker is currently active (focused)
- Coordinate focus management across pickers
- Enable left/right arrow key navigation
data-rwp-wrapper attribute to the container element for styling purposes.