We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c2b465 commit 8567fb3Copy full SHA for 8567fb3
packages/uui-color-slider/lib/uui-color-slider.story.ts
@@ -107,8 +107,6 @@ export const Advanced: Story = {
107
108
const element = e.target as UUIColorSliderElement;
109
110
- console.log('Slider changed', element.value);
111
-
112
if (isNaN(element.value)) return;
113
114
const newColor: HslaColor = {
@@ -137,8 +135,13 @@ export const Advanced: Story = {
137
135
e.stopPropagation();
138
136
139
const input = e.target as HTMLInputElement;
140
- const newValue = parseFloat(input.value);
141
- if (isNaN(newValue)) return;
+
+ let newValue = parseFloat(input.value);
+ if (isNaN(newValue)) {
142
+ newValue = 0;
143
+ input.value = '0';
144
+ }
145
146
147
h: value.h,
0 commit comments