Make it possible to pass custom selectors
See original GitHub issueRight now, the library expects button
elements inside the menu. While correct (I think), it might be a bit restrictive. It would be nice to be able to pass a selector to query the menu items. Also, I think the default should rely on direct children rather than any arbitrary selector.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Is there a way to write custom selectors in LESS?
So I hope I'm communicating clearly what the question is. Is there a way to reuse selections? Note that this is different than...
Read more >Make it possible for adding custom selector utilities in typescript
Make it possible for adding custom selector utilities in typescript. ... The only way to make it work is by using the CSS...
Read more >Build a custom selector - Power Automate | Microsoft Learn
Use operators in a custom selector. In the previous example, the selector located a Notepad window with a specific title. To make the...
Read more >Creating reusable and composable paramaterized Reselect ...
We can make our paramaterized selector call a little cleaner with a simple custom hook: function useParamSelector(selector, ...params) ...
Read more >Deriving Data with Selectors - Redux
The standard approach here is to create a unique instance of a memoized selector in the component, and then use that with useSelector...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Then I’d say the easiest is to enforce direct children to be buttons. But I could see how v2 of the script comes back on this decision and allows more flexibility on the DOM structure.
So the README.md needs to be very clear about the expected structure to close this issue.
It’s kind of a convention for controlled elements to be associated by
id
(see<label for="id">
,aria-describedby="id"
,aria-controls="id"
etc.)The fact that multiple same
id
s are well known to be poor form (and come out as a parse error) helps make sure the developer doesn’t screw up.