Skip to content

<CDropdown doesnt get closed After clicking on <CDropdownItem> #71

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

Closed
yaswanthkoneriomni opened this issue Mar 5, 2020 · 6 comments
Closed

Comments

@yaswanthkoneriomni
Copy link

Before opening an issue:

When asking general "how to" questions:

  • Please do not open an issue here

When reporting a bug, include:

  • Operating system and version (Windows, Mac OS X, Android, iOS, etc...)
  • Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
  • Reduced test cases and potential fixes using CodePen or JS Bin

When suggesting a feature, include:

  • As much detail as possible for what we should add and why it's important to CoreUI Admin Template
  • Relevant links to prior art, screenshots, or live demos whenever possible
@woothu
Copy link

woothu commented Mar 6, 2020

Hi! Thank you for the bug report!
CDropdown was closing only on $route change, now it is closed on every 'dropdown-close' event emitted on it. (CDropdownItem is now emitting such event on CDropdown)

@woothu woothu closed this as completed Mar 6, 2020
@yaswanthkoneriomni
Copy link
Author

yaswanthkoneriomni commented Mar 9, 2020

Hi! Thank you for the bug report!
CDropdown was closing only on $route change, now it is closed on every 'dropdown-close' event emitted on it. (CDropdownItem is now emitting such event on CDropdown)

Can you give an example snippet to achieve this? and also the version in which it is updated

@woothu
Copy link

woothu commented Mar 9, 2020

It is default behavior since 3.0.2 version

@yaswanthkoneriomni
Copy link
Author

yaswanthkoneriomni commented Mar 9, 2020

After the update
<CDropdownItem :key="index" v-for="({text,value, statusId}, index) in filters" @click="filterByStatus(statusId)">

@click event is not getting fired

and also Default value of the dropdown is not available

@woothu
Copy link

woothu commented Mar 9, 2020

ad.2 What do you mean by the default value of the dropdown?

Ad.1 Because click event is not emitted by CDropdownItem component (see docs for emitted events)

You can use @click.native instead

@woothu
Copy link

woothu commented Mar 9, 2020

Actually I forgot that functional components have different events trigger, and didn't add them when I changed CDropdownItem from functional to a normal component.

@click event is available again in the 3.0.3 version.

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