dropdown icon indicating copy to clipboard operation
dropdown copied to clipboard

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

Open heavenlian opened this issue 3 years ago • 1 comments

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

heavenlian avatar Sep 29 '21 08:09 heavenlian

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

LukerSpringtree avatar Oct 31 '21 10:10 LukerSpringtree