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.

Make it possible to pass custom selectors

See original GitHub issue

Right 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:closed
  • Created 6 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
KittyGiraudelcommented, Apr 27, 2017

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.

0reactions
Heydoncommented, Apr 28, 2017

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 ids are well known to be poor form (and come out as a parse error) helps make sure the developer doesn’t screw up.

Read more comments on GitHub >

github_iconTop 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 >

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