Skip to content

Commit 51f4ea2

Browse files
sakshi-arora1ci-build
authored andcommitted
FORMS-13829 Drop Down View not getting updated, even if model is updated. (#1164)
1 parent 465ed81 commit 51f4ea2

File tree

1 file changed

+2
-2
lines changed
  • ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/dropdown/v1/dropdown/clientlibs/site/js

1 file changed

+2
-2
lines changed

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/dropdown/v1/dropdown/clientlibs/site/js/dropdownview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@
117117
}
118118
let isMultiSelect = this._model.isArrayType();
119119
[...this.widget].forEach((option) => {
120+
// clear of any selection, and re-add selection (otherwise HTML shows stale state if it already existed)
121+
option.removeAttribute('selected');
120122
if(this.#checkIfEqual(value, option.value, isMultiSelect)) {
121123
option.setAttribute('selected', 'selected');
122-
} else {
123-
option.removeAttribute('selected');
124124
}
125125
});
126126
super.updateEmptyStatus();

0 commit comments

Comments
 (0)