svelte-formula
Advanced tools
Comparing version 0.8.6 to 0.8.7
@@ -8,2 +8,8 @@ # Changelog | ||
## [0.8.7] - 2021-02-23 | ||
### Changed | ||
- Group elements now have `data-in-group` attribute set which allows for better filtering of groups from form data | ||
## [0.8.6] - 2021-02-23 | ||
@@ -13,4 +19,5 @@ | ||
- When a single value field is emptied after having values, correctly update the form state instead of leaving previous value | ||
- Removed a stay comma introduced in `0.8.5`, and fixed typo in `0.8.4` | ||
- When a single value field is emptied after having values, correctly update the form state instead of leaving previous | ||
value | ||
- Removed a stay console introduced in `0.8.5`, and fixed typo in `0.8.4` | ||
@@ -228,3 +235,3 @@ ## [0.8.3] - 2021-02-22 | ||
```html | ||
<input type='text' name='postcode' required data-value-missing='Bitte geben Sie Ihre Postleitzahl ein' /> | ||
<input type="text" name="postcode" required data-value-missing="Bitte geben Sie Ihre Postleitzahl ein" /> | ||
``` | ||
@@ -231,0 +238,0 @@ |
{ | ||
"name": "svelte-formula", | ||
"description": "Reactive Forms for Svelte", | ||
"version": "0.8.6", | ||
"version": "0.8.7", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "svelte", |
@@ -84,3 +84,3 @@ import { get, writable } from 'svelte/store'; | ||
function getAllFieldsWithValidity(rootEl) { | ||
var nodeList = rootEl.querySelectorAll('*[name]:not([role="beaker-group"] *[name])'); | ||
var nodeList = rootEl.querySelectorAll('*[name]:not([data-in-group])'); | ||
return Array.from(nodeList).filter(function (el) { | ||
@@ -1195,2 +1195,6 @@ return el.checkValidity; | ||
elements.forEach(function (el) { | ||
if (isGroup) { | ||
el.setAttribute('data-in-group', 'true'); | ||
} | ||
setAriaRole(el, elements); | ||
@@ -1197,0 +1201,0 @@ setAriaStates(el); |
@@ -88,3 +88,3 @@ (function (global, factory) { | ||
function getAllFieldsWithValidity(rootEl) { | ||
var nodeList = rootEl.querySelectorAll('*[name]:not([role="beaker-group"] *[name])'); | ||
var nodeList = rootEl.querySelectorAll('*[name]:not([data-in-group])'); | ||
return Array.from(nodeList).filter(function (el) { | ||
@@ -1199,2 +1199,6 @@ return el.checkValidity; | ||
elements.forEach(function (el) { | ||
if (isGroup) { | ||
el.setAttribute('data-in-group', 'true'); | ||
} | ||
setAriaRole(el, elements); | ||
@@ -1201,0 +1205,0 @@ setAriaStates(el); |
124860
3095