daisyui/react-daisyui

Can't set noValidate property on Form

kaeon opened this issue · 3 comments

kaeon commented

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?

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!

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

kaeon commented

@benjitrosch thanks for the quick response and fix!