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

Cat-dropdown issue with content containing cat-buttons #563

Open
ccanow opened this issue Sep 16, 2024 · 0 comments
Open

Cat-dropdown issue with content containing cat-buttons #563

ccanow opened this issue Sep 16, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ccanow
Copy link

ccanow commented Sep 16, 2024

We implemented a custom date-picker inside a cat-dropdown. It is basically a card with a navigation that is build with cat-buttons. When clicking one of those buttons, the dropdown closes. We want the dropdown to close on outside clicks, but obviously not when clicked on anything inside.

@TimSielemann provided us with the tip, that there is an attribute in the code that works, but it feels like a workaround, so we wanted to file it as an issue to get confirmation that it is save to be used, or maybe an explanation for a better solution.
The attribute is: data-dropdown-no-close. By adding it to every button inside the dropdown content, it behaves as expected.

For reference, here is the implementation (see "CurrentRangeButton" for the dropdown definition and "Component" for the list of buttons).

@fynnfeldpausch fynnfeldpausch added the documentation Improvements or additions to documentation label Dec 2, 2024
@fynnfeldpausch fynnfeldpausch self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants