react-forms-processor
react-forms-processor copied to clipboard
autocomplete tag
I would care and I would need <Form> to support the autocomplete tag.
autocomplete - MDN
So, your code don't wrap inputs in html <form> tag. What is a cause of it?
Currently i must wrap your form in html form:
<form autoComplete="off">
<Form defaultFields={shema} renderer={renderer} onChange={this.onChange}/>
</form>
I think your code should wrap inputs in HTML <form> tag and should hand on some props to HTML <form> tag
First of all thanks for your feedback - it's much appreciated. I think that you're completely correct that a <form> tag should be rendered by the Form component - that's a complete oversight on my part and I will rectify this.
I'm just taking a look at this... you're looking to set the autocomplete property on the form itself, so I would need to provide that as a prop to the Form component - I'm wondering whether or not it would make sense to import the HTMLFormElement type (https://www.saltycrane.com/flow-type-cheat-sheet/latest/) from Flow and to use it in union with the current FormComponentProps type as the allowed component type and then spread all the HTMLFormElement props to the form component - this would allow any valid prop to be passed to the form element.
This might be overkill though... I'm also wondering whether individual forms field libraries might specifically need their own specific form component ? Although it might result in semantically better HTML in some cases perhaps this isn't the case for all renderings - therefore maybe not wrapping a form element after all is the better option.
I genuinely can't decide on this. I'll give it some further thought