@rettangoli/ui 0.1.13 → 0.1.15

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.
@@ -131,18 +131,18 @@ class RettangoliSliderElement extends HTMLElement {
131
131
  this._inputElement.value = newValue;
132
132
  }
133
133
 
134
- _onInput = (event) => {
134
+ _onInput = () => {
135
135
  this.dispatchEvent(new CustomEvent('slider-input', {
136
136
  detail: {
137
- value: this._inputElement.value,
137
+ value: Number(this._inputElement.value),
138
138
  },
139
139
  }));
140
140
  };
141
141
 
142
- _onChange = (event) => {
142
+ _onChange = () => {
143
143
  this.dispatchEvent(new CustomEvent('slider-change', {
144
144
  detail: {
145
- value: this._inputElement.value,
145
+ value: Number(this._inputElement.value),
146
146
  },
147
147
  }));
148
148
  };
@@ -238,6 +238,8 @@ class RettangoliSliderElement extends HTMLElement {
238
238
 
239
239
  if (value !== null) {
240
240
  this._inputElement.value = value;
241
+ } else {
242
+ this._inputElement.value = min ?? 0;
241
243
  }
242
244
 
243
245
  if (min !== null) {