- Added missing props to HTMLInformEl typescript definition.
- Typescript: added missing methods (
setValues
,reset
) toHTMLInformEl
. - When using custom elements (inform-field with a name attribute and no form element), the error was not disappearing when the value became valid.
- The default error message now has a default top margin of 5px (unless otherwise specified by
--error-margin
). - Fixed a possible js error on unmount if the form element was destroyed before informel.
- When using error slots, the slot was always shown even if the field was valid (it would be empty when valid but bg color and padding would be visible).
- [Typescript] Return type of
validationHandler
.
default-submit
attribute on<inform-field>
to disable usage ofe.preventDefault()
on submit.
- Mounting new fields that already have a value.
- Support for nested fields.
- Typescript types for
onInformChange
andonInformSubmit
. - Possible exception condition in inform-change and inform-input.
- support for zod schemas.
e.target.dirty
ande.target.values
not being updated ininform-input
andinform-change
events.
- Typescript types
- React: fixed
ref
being called at every render. - Removed
aria-description
in favour ofaria-describedby
which has better support.
requestSubmit
not supported on Safari.
- Dispatching a
inform-updated
event the informel changes the value of a control.
- Regression in react internal wrapper.
- React internal wrapper event handling in strict mode + nextjs useLayoutEffect warning
inform-change
was sending stale values in some cases
- Focus on first invalid field
- InformField TS definition: added missing
name
andref
optional props. - Accessibility fixes: focusing the first invalid input on submit + added
aria-description
witharia-invalid
setValues
resetting other extra values- Removed reference to
RadioNodeList
(not supported by jest/jsdom)
initialValues
prop toInformEl
(React)
- InformelProps type
- Added missing
submitOnChange
prop toInformField
. - React component definition: useEffect -> useLayoutEffect
- React: Support for camelCase props.
- React: fixed boolean props
- Form values don't include empty number inputs and empty file inputs anymore
- Renamed
input
,change
andsubmit
custom events toinform-input
,inform-change
andinform-submit
.
- Calling
requestSubmit()
on the<form>
was throwing an error - InformEl React element type.
inform-el
requestSubmit() methodinform-el
submit event details now contains asubmitter
field.
- Issues with
<input type="file">
reset()
that was showing 'undefined' in text inputssetValues()
that was ignoring radio buttons
setValues()
no longer emitsinput
andchange
events
- Set
aria-invalid
attribute when invalid touched-on-input
attribute on<inform-field>
- Event conflicts for inputs without names
- Parse values for
<input type="number"/>
- Support for
formaction
&formmethod
attributes.
- Support for
<select multiple>
.
- 1.0.0 release
- Typo in README.
error-disable-submit
now disables the submit button only while error are shown (not disabled when the form is loaded)
- Fixed
reset-on-submit
for extra values
- Resetting extra values
- Extra field returned by validationHandler were not ignored
- Support for extra values
name
attribute oninform-field
for extra values.
- Some reset issues: passed values were not always remembered.
- method defaults to 'GET' when not specified.
- Support for other methods than get and post.