Skip to content

Commit

Permalink
fix(form): try .value first when initializing state keys
Browse files Browse the repository at this point in the history
  • Loading branch information
DukeFerdinand committed Feb 5, 2025
1 parent ce14617 commit a9c373a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/form/src/auro-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ export class AuroForm extends LitElement {
'auro-input',
'auro-select',
'auro-datepicker',
// checkbox and radio are grouped elements
'auro-checkbox-group',
'auro-radio-group',
// while counter is groupable, the group is for min/max values and not for grouped values
'auro-counter',
];
}

Expand Down Expand Up @@ -271,7 +275,7 @@ export class AuroForm extends LitElement {
}

this.formState[targetName] = {
value: element.getAttribute('value'),
value: element.value || element.getAttribute('value'),
validity: element.validity || null,
required: element.hasAttribute('required'),
// element
Expand Down

0 comments on commit a9c373a

Please sign in to comment.