question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dropdown's onVisibleChange not trigger

See original GitHub issue

Environment(required)

  • antd version: 1.7.1
  • OS and its version: mac os 10.12.3
  • Browser and its version: chrome 56.0.2924.87

What did you do? Please provide steps to re-produce your problem.

just add a dropdown component, and listen onVisibleChange event

What happened?

when i click on a menu item, the menu is hidden, but not trigger the onVisibleChange event

Re-producible online demo

http://codepen.io/alanwei0/pen/bqbNEa?editors=0011

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

8reactions
delessepscommented, Jan 2, 2018

@afc163, @alanwei0 I’d like to reopen this a bug as it’s still a problem in ant 3.1.0, the name onVisibleChange is a little misleading. Is there a way of triggering onVisibleChange event via another method on the Dropdown component? I would think most people would expect the event to fire when the menu item is clicked and the menu disappears.

4reactions
joenot443commented, Mar 5, 2018

@afc163 I’ve also found this method to not be working. It shouldn’t be in the documentation at all if the functionality has been abandoned.

Read more comments on GitHub >

github_iconTop Results From Across the Web

antd - Is it possible to use Dropdown inside of Popover without ...
The trick is having onVisibleChange always set the state to true , and then closing the popover explicitly from the Dropdown overlay.
Read more >
Dropdown - Ant Design
Called when the open state is changed. Not trigger when hidden by click item. Use onVisibleChange under 4.23.0 (why?) (open: boolean) => void ......
Read more >
antd popover onvisiblechange - Diagnostyka Medyczna
29245; Fix abnormal background color for multiple and disabled Select in dark. ... and clicking on the mask layer on ios does not...
Read more >
Dropdown - Ant Design
By clicking/hovering on the trigger, a dropdown menu should appear, which allows you to ... onVisibleChange, a callback function takes an argument: visible ......
Read more >
Dropdown - Ant Design
A dropdown list. ... By hovering or clicking on the trigger, a dropdown menu will appear, ... onVisibleChange, Called when the visible state...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found