-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiSlider fixes #2588
MultiSlider fixes #2588
Conversation
MultiSlider fixesPreview: documentation | landing | table |
<MultiSlider.Handle | ||
value={value} | ||
intentAfter={value < initialValue ? Intent.PRIMARY : undefined} | ||
intentBefore={value >= initialValue ? Intent.PRIMARY : undefined} | ||
onChange={onChange} | ||
onRelease={onRelease} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@@ -369,9 +369,21 @@ export class MultiSlider extends AbstractPureComponent<IMultiSliderProps, ISlide | |||
const oldValues = this.handleProps.map(handle => handle.value); | |||
if (!Utils.arraysEqual(newValues, oldValues)) { | |||
Utils.safeInvoke(this.props.onChange, newValues); | |||
this.handleProps.forEach((handle, index) => { | |||
if (oldValues[index] !== newValues[index]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@@ -37,9 +37,6 @@ export interface IHandleProps extends IProps { | |||
/** Numeric value of this handle. */ | |||
value: number; | |||
|
|||
/** Whether this handle is non-interactive. */ | |||
disabled?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this to IHandleInternalProps
then? pretty sure it is respected in <Handle>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tho it would be easy enough to support this prop, like you did with onChange/onRelease
Fix typingsPreview: documentation | landing | table |
@@ -37,9 +37,6 @@ export interface IHandleProps extends IProps { | |||
/** Numeric value of this handle. */ | |||
value: number; | |||
|
|||
/** Whether this handle is non-interactive. */ | |||
disabled?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tho it would be easy enough to support this prop, like you did with onChange/onRelease
Several fixes to MultiSlider before final merge