@symphony-talent/component-library 4.134.0 → 4.135.0
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.
- package/esm2020/lib/atoms/input-chips/input-chips.component.mjs +7 -18
- package/esm2020/projects/component-library/lib/atoms/input-chips/input-chips.component.mjs +7 -18
- package/fesm2015/symphony-talent-component-library-projects-component-library.mjs +6 -17
- package/fesm2015/symphony-talent-component-library-projects-component-library.mjs.map +1 -1
- package/fesm2015/symphony-talent-component-library.mjs +6 -17
- package/fesm2015/symphony-talent-component-library.mjs.map +1 -1
- package/fesm2020/symphony-talent-component-library-projects-component-library.mjs +6 -17
- package/fesm2020/symphony-talent-component-library-projects-component-library.mjs.map +1 -1
- package/fesm2020/symphony-talent-component-library.mjs +6 -17
- package/fesm2020/symphony-talent-component-library.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1834,28 +1834,17 @@ class InputChipsComponent {
|
|
|
1834
1834
|
asyncValidators: this.asyncValidators
|
|
1835
1835
|
}));
|
|
1836
1836
|
this.form.valueChanges.subscribe(sc => {
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
}
|
|
1837
|
+
const chipsControl = this.form.controls[this.controlName];
|
|
1838
|
+
this.validationMessage = '';
|
|
1839
|
+
for (const errorMessageKey in this.errorMessages) {
|
|
1840
|
+
if (chipsControl.errors && chipsControl.errors.hasOwnProperty(errorMessageKey)) {
|
|
1841
|
+
this.validationMessage = this.errorMessages[errorMessageKey];
|
|
1842
|
+
break;
|
|
1844
1843
|
}
|
|
1845
|
-
this.canAddTag = false;
|
|
1846
|
-
}
|
|
1847
|
-
else {
|
|
1848
|
-
this.canAddTag = true;
|
|
1849
1844
|
}
|
|
1850
1845
|
});
|
|
1851
1846
|
}
|
|
1852
1847
|
onAdd(event) {
|
|
1853
|
-
// if form control has at least 1 error do not let user add new item
|
|
1854
|
-
if (this.form.controls[this.controlErrorCount].value > 1) {
|
|
1855
|
-
let chips = this.form.controls[this.controlName].value;
|
|
1856
|
-
chips = chips.filter(chip => chip.value !== event.value);
|
|
1857
|
-
this.form.controls[this.controlName].patchValue(chips);
|
|
1858
|
-
}
|
|
1859
1848
|
this.form.controls[this.controlName].updateValueAndValidity();
|
|
1860
1849
|
}
|
|
1861
1850
|
onRemove(event) {
|