Field

Input component for all sorts of data entry

import { Field } from 'q3-ui-forms/lib/builders';

/**
 * Select component that only shows when "bar" has value.
 * It will also reset itself when "bar's" state changes.
 */
export const CustomFormField = () => (
    <Field 
        name="foo"
        type="select"
        options={[
            { label: 'One', value: 1 },
            { label: 'Two', value: 2 }, 
        ]}
        conditional={['bar=*']}
        listen="bar"
        required
    />
);

Prop

Description

Validation

Required

listen

Reset this input's value when other form fields change

String, Array

Last updated