Skip to content
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

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

Open
heavenlian opened this issue Sep 29, 2021 · 1 comment
Open

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

heavenlian opened this issue Sep 29, 2021 · 1 comment

Comments

@heavenlian
Copy link

heavenlian commented Sep 29, 2021

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

@LukerSpringtree
Copy link

@heavenlian
Can't reproduce your question, and your codes has many errros~

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

No branches or pull requests

2 participants