Skip to main content

ComboBox()

function ComboBox(props: ComboBoxProps): Element;

Dropdown/select field component with React Hook Form integration. Wraps the Dimsum ComboBox component with form state management and validation.

Parameters

props

ComboBoxProps

ComboBox component props

Returns

Element

Example

<Form onSubmit={handleSubmit}>
<ComboBox
name="country"
label="Country"
options={[
{ label: 'USA', value: 'us' },
{ label: 'Canada', value: 'ca' }
]}
rules={{ required: 'Please select a country' }}
/>
</Form>