mn-angular-lib 1.0.26 → 1.0.27
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.
|
@@ -2719,7 +2719,8 @@ class MnSelect {
|
|
|
2719
2719
|
this.destroyRef.onDestroy(() => sub.unsubscribe());
|
|
2720
2720
|
}
|
|
2721
2721
|
writeValue(val) {
|
|
2722
|
-
|
|
2722
|
+
// Treat empty string as null so the placeholder is shown and the control stays properly invalid
|
|
2723
|
+
this.selectedValue = (val === '' || val == null) ? null : val;
|
|
2723
2724
|
}
|
|
2724
2725
|
registerOnChange(fn) {
|
|
2725
2726
|
this.onChange = fn;
|