@kirbydesign/designsystem 4.0.11 → 4.0.12

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.
@@ -6192,6 +6192,13 @@
6192
6192
  enumerable: false,
6193
6193
  configurable: true
6194
6194
  });
6195
+ Object.defineProperty(RadioGroupComponent.prototype, "hasValue", {
6196
+ get: function () {
6197
+ return this.value !== undefined && this.value !== null;
6198
+ },
6199
+ enumerable: false,
6200
+ configurable: true
6201
+ });
6195
6202
  Object.defineProperty(RadioGroupComponent.prototype, "hasItemsFromContentProjection", {
6196
6203
  get: function () {
6197
6204
  return (!this.items.length &&
@@ -6259,7 +6266,7 @@
6259
6266
  // #endregion "protected" methods used by template
6260
6267
  // #region private methods
6261
6268
  RadioGroupComponent.prototype.getIndexOfSelectedValue = function () {
6262
- if (!this.value)
6269
+ if (!this.hasValue)
6263
6270
  return -1;
6264
6271
  return this.hasItemsFromContentProjection
6265
6272
  ? this.getIndexOfProjectedRadio(this.value)
@@ -6308,10 +6315,11 @@
6308
6315
  });
6309
6316
  };
6310
6317
  RadioGroupComponent.prototype.refreshSelectionState = function () {
6311
- if (this.value) {
6318
+ if (this.hasValue) {
6312
6319
  this._selectedIndex = this.getIndexOfSelectedValue(); // Ensure selectedIndex reflects value within items
6313
6320
  }
6314
- this._value = this.getValueFromSelectedIndex() || null; // Ensure value exists within items
6321
+ var valueFromSelectedIndex = this.getValueFromSelectedIndex();
6322
+ this._value = valueFromSelectedIndex !== undefined ? valueFromSelectedIndex : null;
6315
6323
  };
6316
6324
  RadioGroupComponent.prototype.refreshStateFromProjectedContent = function () {
6317
6325
  if (!!this._customItemTemplate)