The type of inputProps prop requires every possible attribute for HTMLInputElement type #2891
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
The typing for the
inputProps
prop for componentsAutoComplete
,Dropdown
,CascadeSelect
, andMultiSelect
require a full object of all possible attributes specified under theHTMLInputElement
-type which leads to TypeScript errors.I imagine the typing for this prop should be something like
Partial<HTMLInputElement>
. The propspanelProps
for each component seem to have the same kind of typing.Possibly related to issues #2831, #2822, #2814, and #2811.
Reproducer
No response
PrimeVue version
3.16.2
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
{ name: 'username' }
Type '{ name: string; }' is missing the following properties from type 'HTMLInputElement': accept, align, alt, autocomplete, and 332 more.
for theinputProps
prop.Expected behavior
I'm expecting to be required to pass only the attributes needed, e.g. 'name', to the underlying input element instead of every possible attribute specified under the type
HTMLInputElement
.The text was updated successfully, but these errors were encountered: