Skip to content

Commit 3217c1a

Browse files
Joren Broekematlouisse
authored andcommitted
fix(field): value delegation compatible with FormatMixin
1 parent b38c6c3 commit 3217c1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/field/src/LionField.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@ export class LionField extends FormControlMixin(
102102
}
103103

104104
connectedCallback() {
105+
// TODO: Normally we put super calls on top for predictability,
106+
// here we temporarily need to do attribute delegation before,
107+
// so the FormatMixin uses the right value. Should be solved
108+
// when value delegation is part of the calculation loop of
109+
// FormatMixin
110+
this._delegateInitialValueAttr();
105111
super.connectedCallback();
106112

107113
this._onChange = this._onChange.bind(this);
108114
this.inputElement.addEventListener('change', this._onChange);
109-
this._delegateInitialValueAttr();
110115
this.classList.add('form-field'); // eslint-disable-line
111116
}
112117

0 commit comments

Comments
 (0)