From 0bb8b4030e1d1694cb2b463b84da26bc8af93178 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 1 Jun 2021 17:59:49 -0400 Subject: [PATCH] LP#1904244: combobox: add a 'mandatory' attribute This is a synonym of the 'required' attribute, as overloading the HTML5 required attribute can lead the colored left border indicated the state of the widget extending to the container of the combobox. Signed-off-by: Galen Charlton Signed-off-by: Ruth Frasur Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts index 96c15fae46..50241894e5 100644 --- a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts +++ b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts @@ -74,6 +74,14 @@ export class ComboboxComponent implements ControlValueAccessor, OnInit, AfterVie @Input() set required(r: boolean) { this.isRequired = r; } + // and a 'mandatory' synonym, as an issue + // has been observed in at least Firefox 88.0.1 + // where the left border indicating whether a required + // value has been set or not is displayed in the + // container of the combobox, not just the dropdown + @Input() set mandatory(r: boolean) { + this.isRequired = r; + } // Disable the input isDisabled: boolean; -- 2.11.0