react-component / react-component/slider

Non-editable range slider causes onDelete undefined error

Open
#1,054 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

Create a range slider with <Slider range />. This creates an uneditable range. Therefore when the <Handle> gets rendered, onDelete is passed as undefined. However, Handle still tries to call onDelete unconditionally, which causes a "onDelete is undefined" error when you press delete:

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the Handle delete-key path when it is rendered by and inspect nearby tests for keyboard behavior. Confirm the non-editable range no longer throws when Delete is pressed, while editable-handle deletion continues to work, and add a regression test if the existing suite covers this behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.