You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update README and example for disabled array feature
- Update README.md with disabled array and onDisabledChange documentation
- Fix BasicDisabledHandle example to handle sparse disabled array
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,12 +108,13 @@ The following APIs are shared by Slider and Range.
108
108
| handle | (props) => React.ReactNode || A handle generator which could be used to customized handle. |
109
109
| included | boolean |`true`| If the value is `true`, it means a continuous value interval, otherwise, it is a independent value. |
110
110
| reverse | boolean |`false`| If the value is `true`, it means the component is rendered reverse. |
111
-
| disabled | boolean |`false`| If `true`, handles can't be moved. |
111
+
| disabled | boolean \| boolean[]|`false`| If `true`, handles can't be moved. Can also be an array to disable specific handles in range mode, e.g. `[true, false, true]` disables first and third handles. |
112
112
| keyboard | boolean |`true`| Support using keyboard to move handlers. |
113
113
| dots | boolean |`false`| When the `step` value is greater than 1, you can set the `dots` to `true` if you want to render the slider with dots. |
114
114
| onBeforeChange | Function | NOOP |`onBeforeChange` will be triggered when `ontouchstart` or `onmousedown` is triggered. |
115
115
| onChange | Function | NOOP |`onChange` will be triggered while the value of Slider changing. |
116
116
| onChangeComplete | Function | NOOP |`onChangeComplete` will be triggered when `ontouchend` or `onmouseup` is triggered. |
117
+
| onDisabledChange | (disabled: boolean[]) => void | - | Callback when disabled array needs to be updated (e.g., when handles are added/removed in editable mode). Use with `disabled` as array to keep disabled states in sync. |
117
118
| minimumTrackStyle | Object || please use `trackStyle` instead. (`only used for slider, just for compatibility , will be deprecate at rc-slider@9.x `) |
118
119
| maximumTrackStyle | Object || please use `railStyle` instead (`only used for slider, just for compatibility , will be deprecate at rc-slider@9.x`) |
119
120
| handleStyle | Array[Object]\| Object |`[{}]`| The style used for handle. (`both for slider(`Object`) and range(`Array of Object`), the array will be used for multi handle following element order`) |
0 commit comments