Skip to content

Fix keyboard control for null step with marks #607

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

weijiangan
Copy link

Currently, util.calculateNextValue() incorrectly returns mark object instead of value when steps are disabled (by passing null to step prop) and marks are used

The consequence of this is keyboard navigation will crash the slider due to unhandled errors that stem from unexpected value type.

Steps to reproduce

  1. Pass a marks object as prop to slider component
  2. Pass step = {null} as prop to slider component
  3. Manipulate slider position using arrow keys

calculateNextValue incorrectly returns mark object instead of value when steps are disabled
@codecov
Copy link

codecov bot commented Dec 10, 2019

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.40%. Comparing base (34fca54) to head (4665779).
⚠️ Report is 218 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #607   +/-   ##
=======================================
  Coverage   95.40%   95.40%           
=======================================
  Files           2        2           
  Lines          87       87           
  Branches       29       29           
=======================================
  Hits           83       83           
  Misses          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@weijiangan weijiangan changed the title calculateNextValue return key instead of object Fix keyboard control for null step with marks Dec 26, 2019
@yoyo837
Copy link
Member

yoyo837 commented Apr 15, 2023

Rebase please.

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.

2 participants