@nyaruka/temba-components 0.130.0 → 0.130.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -592,10 +592,7 @@ export class Select<T extends SelectOption> extends FieldElement {
592
592
  this.prepareOptionsDefault = this.prepareOptionsDefault.bind(this);
593
593
  this.isMatchDefault = this.isMatchDefault.bind(this);
594
594
  this.handleOrderChanged = this.handleOrderChanged.bind(this);
595
-
596
- this.createArbitraryOption = (
597
- this.createArbitraryOption || this.createArbitraryOptionDefault
598
- ).bind(this);
595
+ this.createArbitraryOption = this.createArbitraryOptionDefault.bind(this);
599
596
  }
600
597
 
601
598
  public prepareOptionsDefault(options: T[]): T[] {
@@ -708,6 +705,13 @@ export class Select<T extends SelectOption> extends FieldElement {
708
705
  public updated(changes: Map<string, any>) {
709
706
  super.updated(changes);
710
707
 
708
+ if (changes.has('createArbitraryOption')) {
709
+ if (!this.createArbitraryOption) {
710
+ this.createArbitraryOption =
711
+ this.createArbitraryOptionDefault.bind(this);
712
+ }
713
+ }
714
+
711
715
  if (changes.has('sorted')) {
712
716
  this.sortFunction = this.sorted ? this.alphaSort : null;
713
717
  }