Description
Describe the bug
My @primevue/forms
types are missing a name
property for the FormField
component. This looks like it was addressed in commit a7679da
My package version in package.json
is: @primevue/forms": "^4.2.5
/**
* Defines valid properties in Form component.
*/
export interface FormFieldProps {
/**
* A function that resolves validation logic.
* @param {FormResolverOptions} e - Resolver options
*/
resolver?: (e: FormFieldResolverOptions) => any | undefined;
/**
* The initial value for the form field.
*/
initialValue?: any;
/**
* Whether to validate the form field when the value change.
*/
validateOnValueUpdate?: boolean | undefined;
/**
* Whether to validate the form field when it loses focus (on blur).
*/
validateOnBlur?: boolean | undefined;
/**
* Whether to validate the form field immediately after the form is mounted.
*/
validateOnMount?: boolean | undefined;
/**
* Whether to validate the form field when the form is submitted.
*/
validateOnSubmit?: boolean | undefined;
/**
* Use to change the HTML tag of root element.
* @defaultValue DIV
*/
as?: string | Component | undefined;
/**
* When enabled, it changes the default rendered element for the one passed as a child element.
* @defaultValue false
*/
asChild?: boolean | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
dt?: DesignToken<any>;
/**
* Used to pass attributes to DOM elements inside the component.
* @type {FormPassThroughOptions}
*/
pt?: PassThrough<FormFieldPassThroughOptions>;
/**
* Used to configure passthrough(pt) options of the component.
* @type {PassThroughOptions}
*/
ptOptions?: PassThroughOptions;
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
}
Pull Request Link
No response
Reason for not contributing a PR
- Lack of time
- Unsure how to implement the fix/feature
- Difficulty understanding the codebase
- Other
Other Reason
There is already a commit that should fix this, it appears that it hasn't been published to the npm registry.
See commit here: a7679da
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template?file=README.md
Environment
I don't see a TypeScript template so i'm linking a blank template.
Vue version
3.5.11
PrimeVue version
4.2.5
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Try adding the name
prop to a FormField
in a TypeScript application.
You will see the error Object literal may only specify known properties, and 'name' does not exist in type 'FormFieldProps & VNodeProps & AllowedComponentProps & ComponentCustomProps'.
Expected behavior
No TypeScript compiler errors.
Metadata
Metadata
Assignees
Type
Projects
Status