@ovok/native/picker-sheet
Wheel pickers and the bottom picker sheet.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
Wheel pickers and the bottom picker sheet.
Import from @ovok/native/picker-sheet.
Components
PickerSheet
const PickerSheet: NamedExoticComponent<PickerSheetProps & RefAttributes<BottomSheetModal>>;Bottom sheet modal that sizes itself to its content; the ref is the underlying modal.
WheelPicker
const WheelPicker: MemoExoticComponent<(__namedParameters) => Element>;Vertical snapping wheel for choosing one option from a list.
ValueWheelPicker()
function ValueWheelPicker<T>(__namedParameters): Element;Wheel picker over typed option values.
Type Parameters
Parameters
| Parameter | Type |
|---|---|
__namedParameters | ValueWheelPickerProps<T> |
Returns
Element
Interfaces
WheelPickerProps
Props for WheelPicker.
Properties
Type Aliases
ValueWheelPickerProps
type ValueWheelPickerProps<T> = Omit<WheelPickerProps, "options" | "selectedIndex" | "onChange"> & object;Props for ValueWheelPicker; also accepts WheelPickerProps except options, selectedIndex and onChange.
Type Parameters
Type Declaration
| Name | Type | Description |
|---|---|---|
defaultIndex? | number | Selects a display-only option when value is unset. It is not reported through onChange until the person manipulates the picker. |
getOptionKey()? | (value) => string | Supplies value equality for non-primitive option values. |
onChange() | (value) => void | Called with the chosen option's value once the user settles on it. |
options | readonly WheelPickerOption<T>[] | Options in display order. |
value? | T | null | Currently selected value. |
WheelPickerOption
type WheelPickerOption<T> = object;A wheel option pairing a display label with its value.
Type Parameters
Properties
label
label: string;Text shown for the option.
value
value: T;Value reported when the option is chosen.
Last updated on