react-component / react-component/dropdown

visible is false but still have class “rc-dropdown-open”

Open
#179 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
181
Forks
112
Avg merge
12h 52m
Merged PRs (30d)
2

Description

file1

  import Button from 'rc-button';
  const overlay = () => {
   return (
    <Button onClick={props.onHandle}> close </Button>
   )
 }
export default overlay

file2

 import Dropdown from 'rc-dropdown';
import Overlay from './overlay'
  const drop = () => {
  const  [visible, setVisible] = useState(false)
    return (
      <Dropdown
        overlay={<OverLay onHandle={setVisible(false}} />}
        visible={visible}
      >
        <Button> show </Button>
      </Dropdown>
    )
  }
export default drop

when click button close , but the Button class still have rc-dropdown-open

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

Reproduce the issue using the two-component Dropdown and overlay example in the report, focusing on the controlled visible={false} transition after clicking the close button. Trace the Dropdown trigger's open-class handling, then add a regression test for closing through the overlay and confirm that rc-dropdown-open is removed.

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
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.