-
-
Notifications
You must be signed in to change notification settings - Fork 783
Closed
Description
The components src/Slider.tsx and src/Range.tsx define step prop as undefined or number. It should also include null as it is used in Range:
Lines 318 to 333 in b5a337e
| getPoints() { | |
| const { marks, step, min, max } = this.props; | |
| const cache = this.internalPointsCache; | |
| if (!cache || cache.marks !== marks || cache.step !== step) { | |
| const pointsObject = { ...marks }; | |
| if (step !== null) { | |
| for (let point = min; point <= max; point += step) { | |
| pointsObject[point] = point; | |
| } | |
| } | |
| const points = Object.keys(pointsObject).map(parseFloat); | |
| points.sort((a, b) => a - b); | |
| this.internalPointsCache = { marks, step, points }; | |
| } | |
| return this.internalPointsCache.points; | |
| } |
So I would suggest changing the type for step prop to be step?: number | null
Related to changes that came in this pull request #641
jnachtigall
Metadata
Metadata
Assignees
Labels
No labels