react-component / react-component/menu

rc-menu doesn't work well with checkbox in menu-item

Open
#703 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
701
Forks
266
Avg merge
4d 11h
Merged PRs (30d)
3

Description

code blob like below:

const menu = [
{key: '0', label: 'Item 1flshgslhgslhglshg', disabled: true},
{key: '1', label: 'Item 2', checked: true},
{key: '2', label: 'Item 3'}];

{ menu.map((item) => { return }

problems:
when I click checkbox, it will call both onSelect and onDeselect.

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

Start from the provided Menu and Item reproduction, focusing on the checkbox click path and the onSelect/onDeselect entry points. Confirm the current event sequence, then define the intended single callback behavior and add coverage for clicking a checkbox in a multiple menu.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.