Arc.React
    Preparing search index...

    Interface CommandFormFieldProps<TCommand>

    Props for the CommandFormField marker component.

    The value accessor uses a method declaration for bivariant type checking, allowing (c: MyCommand) => c.name to be passed via React.createElement without explicit generic arguments. For full type safety in JSX, supply the command type explicitly:

    <CommandFormField value={c => c.name} />

    interface CommandFormFieldProps<TCommand = unknown> {
        currentValue?: unknown;
        description?: string;
        fieldName?: string;
        icon?: ReactElement<any, string | JSXElementConstructor<any>>;
        onChange?: (value: unknown) => void;
        onValueChange?: (value: unknown) => void;
        propertyDescriptor?: unknown;
        required?: boolean;
        title?: string;
        value?(instance: TCommand): unknown;
    }

    Type Parameters

    • TCommand = unknown
    Index

    Properties

    currentValue?: unknown

    Current value for the property (injected by CommandFormFields)

    description?: string
    fieldName?: string
    icon?: ReactElement<any, string | JSXElementConstructor<any>>
    onChange?: (value: unknown) => void
    onValueChange?: (value: unknown) => void

    Called when the field value changes (injected by CommandFormFields)

    propertyDescriptor?: unknown
    required?: boolean
    title?: string

    Methods