Skip to content

Commit

Permalink
fix(ui5-select): infinite attribute update in value property setter (#…
Browse files Browse the repository at this point in the history
…9500)

An infinite attribute update occurred due to the set and get accessors of the value property when an invalid value was passed (one that did not match any of the select's options). This caused the getter to return a value out of sync with what was set by the setter (the attribute that results in the DOM by the set) prompting the framework to trigger another set.

This PR remove the value attribute from the DOM. This prevents the framework on attribute check call and the infinite recursive call stops.
  • Loading branch information
dobrinyonkov authored Jul 25, 2024
1 parent ea60331 commit 079ee04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/main/src/Select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class Select extends UI5Element implements IFormInputElement {
* @formProperty
* @formEvents change liveChange
*/
@property()
@property({ noAttribute: true })
set value(newValue: string) {
const options = Array.from(this.children) as Array<IOption>;

Expand Down

0 comments on commit 079ee04

Please sign in to comment.