diff --git a/src/ftxui/component/slider.cpp b/src/ftxui/component/slider.cpp index 08858a9..9a2052f 100644 --- a/src/ftxui/component/slider.cpp +++ b/src/ftxui/component/slider.cpp @@ -421,7 +421,7 @@ public: bool Focusable() const final { return true; } void SetValue(Ref val) { - value_() = val(); + value_() = util::clamp(val(), min_(), max_()); callback_(value_()); }