PrimeFormConfig
| Generic types: | TFields TValue |
PrimeNG-specific FormConfig with type-safe defaultProps.
Use this type alias when defining form configurations with PrimeNG components to get IDE autocomplete and type checking for defaultProps.
Presentation
type PrimeFormConfig = FormConfig <TFields, TValue, PrimeFormProps >;Example usage
const formConfig : PrimeFormConfig = {
defaultProps: {
size: 'small',
variant: 'filled',
severity: 'secondary',
},
fields: [
{ type: 'prime-input', key: 'name', label: 'Name' }, // Uses form defaultProps
{ type: 'prime-input', key: 'email', props: { variant: 'outlined' } }, // Override
],
};