You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FormField]: clearable set once on the form field, shared by DateField and TimeField #572
clearable exists twice for the same visible affordance. tedi-form-field has one (default false) that renders .tedi-form-field__clear, and tedi-time-field has its own (default true) that renders .tedi-time-field__clear in its action row. A consumer wrapping a time field in <tedi-form-field clearable> gets two clear buttons in the same box, and there is no single place to turn the affordance on or off.
Solution
Add clearable to FieldContext, so the control reads the wrapper's setting instead of declaring its own.
tedi-form-field's clearable defaults to true and accepts a bare clearable attribute.
Date and time fields resolve clearable() ?? fieldContext?.clearable() ?? true, the same pattern fix(form-field): wrapper is not required by controls anymore #612 #617 uses for size. Inside a form field, set it on the wrapper; the control's own input exists for standalone use and overrides the wrapper when set.
Add optional ownsClearButton to FormFieldControl. Date and time set it, so the field skips its generic clear button — their button cannot move into form-field, because the picker button beside it is the overlay's anchor and the design puts clear before it in the action row.
Storybook: group size and clearable under Form Field inputs for both fields, matching TextField, so wrapper-owned args read separately from the control's own.
BREAKING CHANGE: tedi-form-field's clearable now defaults to true, so fields that previously showed no clear button now show one once they have a value, and the form field renders its own surface box around text fields and textareas. Pass [clearable]="false" to opt out.
Problem
clearableexists twice for the same visible affordance.tedi-form-fieldhas one (defaultfalse) that renders.tedi-form-field__clear, andtedi-time-fieldhas its own (defaulttrue) that renders.tedi-time-field__clearin its action row. A consumer wrapping a time field in<tedi-form-field clearable>gets two clear buttons in the same box, and there is no single place to turn the affordance on or off.Solution
clearabletoFieldContext, so the control reads the wrapper's setting instead of declaring its own.tedi-form-field'sclearabledefaults totrueand accepts a bareclearableattribute.clearable() ?? fieldContext?.clearable() ?? true, the same pattern fix(form-field): wrapper is not required by controls anymore #612 #617 uses forsize. Inside a form field, set it on the wrapper; the control's own input exists for standalone use and overrides the wrapper when set.ownsClearButtontoFormFieldControl. Date and time set it, so the field skips its generic clear button — their button cannot move into form-field, because the picker button beside it is the overlay's anchor and the design puts clear before it in the action row.sizeandclearableunderForm Field inputsfor both fields, matching TextField, so wrapper-owned args read separately from the control's own.BREAKING CHANGE: tedi-form-field's clearable now defaults to true, so fields that previously showed no clear button now show one once they have a value, and the form field renders its own surface box around text fields and textareas. Pass [clearable]="false" to opt out.