Skip to main content

FieldStructure Interface

This is the interface which currently is extending all field types in our form

interface FieldStructure {
conditionalRender?: {
conditionalFields: ConditionalType[];
conditionalRulesChainOption?: 'AND' | 'OR';
};
fieldWrapperProperties?: JSX.IntrinsicElements['div'];
fieldLabel?: (name: string) => ReactNode;
placeholder?: string;
validations?: unknown;
associatedValidationBasedOnOtherFieldValues?: AssociatedValidation[];
arrayOfFieldsToRevalidateOnChange?: FieldTrackerInterface[];
ariaRequired?: boolean;
disabled?: boolean;
elementProperties?: any;
partialFieldProps?: Pick<
UseFieldConfig<any>,
| 'afterSubmit'
| 'allowNull'
| 'beforeSubmit'
| 'data'
| 'format'
| 'formatOnBlur'
| 'isEqual'
| 'parse'
>;
}