@pumpkin-tech/pumpkin-tech-ng 0.2.5 → 0.2.6
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.
|
@@ -3598,6 +3598,14 @@ class SelectEnumComponent extends BaseField {
|
|
|
3598
3598
|
this.onTouch();
|
|
3599
3599
|
}
|
|
3600
3600
|
ngOnInit() {
|
|
3601
|
+
this.refreshEnumList();
|
|
3602
|
+
}
|
|
3603
|
+
ngOnChanges(changes) {
|
|
3604
|
+
if (changes['enum'] || changes['sort']) {
|
|
3605
|
+
this.refreshEnumList();
|
|
3606
|
+
}
|
|
3607
|
+
}
|
|
3608
|
+
refreshEnumList() {
|
|
3601
3609
|
this.enumList = Object.keys(this.enum || {})
|
|
3602
3610
|
.map(key => ({ key, value: this.enum[key] }))
|
|
3603
3611
|
.sort(this.sort);
|
|
@@ -3619,7 +3627,7 @@ class SelectEnumComponent extends BaseField {
|
|
|
3619
3627
|
useExisting: forwardRef(() => SelectEnumComponent),
|
|
3620
3628
|
multi: true,
|
|
3621
3629
|
},
|
|
3622
|
-
], usesInheritance: true, ngImport: i0, template: `
|
|
3630
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
3623
3631
|
<div class="select-enum-container">
|
|
3624
3632
|
<mat-form-field class="select-enum-field" [appearance]="appearance">
|
|
3625
3633
|
<mat-label>
|