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

[core] fix(Slider): error if min/max are not finite #5964

Merged

Conversation

akatcha
Copy link
Contributor

@akatcha akatcha commented Feb 20, 2023

Enforcing min and max values to be finite
Added two unit tests

Fixes #5436

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Added a prop validation that checks that the minimum value and maximum values are both finite. If they're not, then throw an error.

Reviewers should focus on:

Constraints added to the MultiSlider (includes Slider + RangeSlider, since they're both implemented as MulitSliders under the hood) Component + Documentation

Screenshot

image

Enforcing min and max values to be finite
Added two unit tests
@palantirtech
Copy link
Member

Thanks for your interest in palantir/blueprint, @akatcha! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@adidahiya
Copy link
Contributor

thanks @akatcha!

@adidahiya adidahiya changed the title [Fix] Dev Browser Page Throws an Error if MulitSlider's 'max' or 'min' prop is not a Finite Number [core] fix(Slider): error if min/max are not finite Feb 21, 2023
@adidahiya adidahiya merged commit 743fcfd into palantir:develop Feb 21, 2023
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.

The browser page will crash if the Slider max is set to Number.POSITIVE_INFINITY.
3 participants