daisyui / react-daisyui

daisyUI components built with React 🌼
http://react.daisyui.com/
MIT License
961 stars 103 forks source link

Can't set noValidate property on Form #286

Closed kaeon closed 1 year ago

kaeon commented 1 year ago

I get a typescript error when setting the noValidate property on Form. When I just use

I get no issue.

Type for a regular form is DetailedHTMLProps<FormHTMLAttributes, HTMLFormElement>

Any idea how to fix these typescript issues?

benjitrosch commented 1 year ago

Hi @kaeon, thanks for bringing this to our attention. Right now the current type for the FormProps comes from HTMLAttributes<HTMLFormElement> rather than DetailedHTMLProps<FormHTMLAttributes, HTMLFormElement> so maybe that's where the issue lies.

https://github.com/daisyui/react-daisyui/blob/main/src/Form/Form.tsx#L8

I'll make a PR (or feel free to do so yourself) and see if that fixes it!

benjitrosch commented 1 year ago

Should be fixed with #287, I'll try to get that merged soon.

kaeon commented 1 year ago

@benjitrosch thanks for the quick response and fix!