File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
packages/machines/slider/src Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @zag-js/slider " : patch
3+ ---
4+
5+ Fix issue where programmatic value changes do not trigger the ` onValueChangeEnd ` callback. This affects the following
6+ API methods:
7+
8+ - ` slider.setThumbValue(index, value) `
9+ - ` slider.setValue(value) `
10+ - ` slider.increment(index) `
11+ - ` slider.decrement(index) `
Original file line number Diff line number Diff line change @@ -133,17 +133,17 @@ export const machine = createMachine<SliderSchema>({
133133 SET_VALUE : [
134134 {
135135 guard : "hasIndex" ,
136- actions : [ "setValueAtIndex" ] ,
136+ actions : [ "setValueAtIndex" , "invokeOnChangeEnd" ] ,
137137 } ,
138138 {
139- actions : [ "setValue" ] ,
139+ actions : [ "setValue" , "invokeOnChangeEnd" ] ,
140140 } ,
141141 ] ,
142142 INCREMENT : {
143- actions : [ "incrementThumbAtIndex" ] ,
143+ actions : [ "incrementThumbAtIndex" , "invokeOnChangeEnd" ] ,
144144 } ,
145145 DECREMENT : {
146- actions : [ "decrementThumbAtIndex" ] ,
146+ actions : [ "decrementThumbAtIndex" , "invokeOnChangeEnd" ] ,
147147 } ,
148148 } ,
149149
You can’t perform that action at this time.
0 commit comments