react-component / react-component/dropdown
visible is false but still have class “rc-dropdown-open”
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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