Skip to content

Commit

Permalink
FIO--7530: added ability to pass onSetItems component setting as a st…
Browse files Browse the repository at this point in the history
…ring (needed for builder mode)
  • Loading branch information
TanyaGashtold committed Nov 6, 2023
1 parent 6627908 commit 3683ef9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,10 @@ export default class SelectComponent extends ListComponent {
}

// Allow js processing (needed for form builder)
if (this.component.onSetItems && typeof this.component.onSetItems === 'function') {
const newItems = this.component.onSetItems(this, items);
if (this.component.onSetItems) {
const newItems = typeof this.component.onSetItems === 'function'
? this.component.onSetItems(this, items)
: this.evaluate(this.component.onSetItems, { items: items }, 'items');
if (newItems) {
items = newItems;
}
Expand Down

0 comments on commit 3683ef9

Please sign in to comment.