Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: slider input when cleared (#6557)

Myles Scolnickc8f154002e5a
diff --git a/frontend/src/plugins/impl/SliderPlugin.tsx b/frontend/src/plugins/impl/SliderPlugin.tsx
index a00b4f9ae7..d5aab40637 100644
--- a/frontend/src/plugins/impl/SliderPlugin.tsx
+++ b/frontend/src/plugins/impl/SliderPlugin.tsx
@@ -147,6 +147,10 @@ const SliderComponent = ({
<NumberField
value={valueMap(internalValue)}
onChange={(nextValue) => {
+ // If nextValue is null/undefined (input cleared), set to start
+ if (nextValue == null) {
+ nextValue = Number(start);
+ }
setInternalValue(nextValue);
if (!debounce) {
setValue(nextValue);