Skip to content
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

Merged
merged 3 commits into from
Jun 12, 2018
Merged

Conversation

jscheiny
Copy link
Contributor

Several fixes to MultiSlider before final merge

@jscheiny jscheiny requested a review from giladgray June 11, 2018 21:12
@blueprint-bot
Copy link

MultiSlider fixes

Preview: documentation | landing | table

<MultiSlider.Handle
value={value}
intentAfter={value < initialValue ? Intent.PRIMARY : undefined}
intentBefore={value >= initialValue ? Intent.PRIMARY : undefined}
onChange={onChange}
onRelease={onRelease}
Copy link
Contributor

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]) {
Copy link
Contributor

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;
Copy link
Contributor

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>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fixed.

Copy link
Contributor

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

@blueprint-bot
Copy link

Fix typings

Preview: 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;
Copy link
Contributor

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

@giladgray giladgray merged commit e4681e6 into js/multi-range-slider Jun 12, 2018
@giladgray giladgray deleted the js/multi-range-slider-fixes branch June 12, 2018 17:35
@blueprint-bot blueprint-bot mentioned this pull request Jun 12, 2018
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants