@cscfi/csc-ui 2.1.4 → 2.1.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.
@@ -1915,6 +1915,12 @@ const CSelect = class {
1915
1915
  const isOpen = event.detail;
1916
1916
  this.dropdownVisible = isOpen;
1917
1917
  }
1918
+ onValueChanged() {
1919
+ var _a;
1920
+ if (!this.value && this.optionAsSelection) {
1921
+ (_a = this._selectionElement) === null || _a === void 0 ? void 0 : _a.replaceChildren();
1922
+ }
1923
+ }
1918
1924
  onSelectOption(event) {
1919
1925
  this._dropdownElement.close();
1920
1926
  const { name, value } = event.detail;
@@ -2017,6 +2023,9 @@ const CSelect = class {
2017
2023
  }
2018
2024
  static get formAssociated() { return true; }
2019
2025
  get el() { return getElement(this); }
2026
+ static get watchers() { return {
2027
+ "value": ["onValueChanged"]
2028
+ }; }
2020
2029
  };
2021
2030
  CSelect._uniqueId = 0;
2022
2031
  CSelect.style = cSelectCss;