You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a simple app using ybc and yew-router, triggering routing by using href on navbar items.
Some of these are in a navbar-dropdown, and I've noticed that the dropdown only closes when you click on the overlay, but not when you click on an item in the dropdown; this doesn't really work for my usecase, where the dropdown is used like a menu to navigate the page as described above.
I think this could be fixed by (maybe optionally) internally handling the onclick event on the dropdown itself, which should catch any clicks on its children if they're not getting cancelled (so this approach would still allow overriding this behavior for specific items in any case).
Would you be interested in a PR implementing a feature like that? And if so, should it be an option or the default case? And if it should be optional, what should I call the property on NavbarDropdown?
The text was updated successfully, but these errors were encountered:
Hey there @Follpvosten! That sounds pretty reasonable. You could also just use the hover functionality on the dropdown. As soon as the user is no longer hovering, then the dropdown will be removed.
Otherwise, the closest functionality that we currently have like that is the Modal and related components. You might find some inspiration there. Keep me posted!
Hi and thanks for the feedback!
I know how the hover version works and would prefer to stay with the click version, but with this change.
Would a PR be welcome?
I'm writing a simple app using ybc and yew-router, triggering routing by using href on navbar items.
Some of these are in a navbar-dropdown, and I've noticed that the dropdown only closes when you click on the overlay, but not when you click on an item in the dropdown; this doesn't really work for my usecase, where the dropdown is used like a menu to navigate the page as described above.
I think this could be fixed by (maybe optionally) internally handling the onclick event on the dropdown itself, which should catch any clicks on its children if they're not getting cancelled (so this approach would still allow overriding this behavior for specific items in any case).
Would you be interested in a PR implementing a feature like that? And if so, should it be an option or the default case? And if it should be optional, what should I call the property on NavbarDropdown?
The text was updated successfully, but these errors were encountered: