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.

Building "nested" ColumnMenu's

See original GitHub issue

I’m attempting to build “nested” ColumMenu’s. What I mean by this is for example if a user selects a top level menu item “A”, the menu is replaced with “B”. If they choose “C” from B, they get another menu. This can all be unwound e.g. by pressing ESC.

This seems very similar to #150 - Update A ColumnMenu’s Items.

Currently I’m attempting to do this via multiple menus with the same dimensions and coordinates. E.g.:

// submit handler for "A"
menuB.hidden = false; // B and C start out hidden, etc.
menuB.redraw();
document.giveFocusTo(menuB);

This is of course a hack. Some things I think would help is element.show() / element.hide().

Additionally I’m running into a issue with ‘blink()’. Since this happens with a timer, “B” is drawn then “A”'s blink loop messes with it. A couple thoughts:

  • For my purposes the ability to disable blink would work, though I do like the effect in general. Probably worth having some control here though.
  • It may be more ideal to have submit blink -> emit ‘submit’ at the end of the blink cycle?
  • Something else?!

Finally, is a nested menu system like this anywhere on the roadmap? If a single element could allow nesting and perhaps menu ident for nested items (I would use 0 indent in my case)? A x/y indent would allow for “tree” type views perhaps.

Any hints appreciated. I’d like to make myself more useful other than just asking stuff, but will need some hints on where you’re taking things in order to do any coding.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
cronvelcommented, Feb 17, 2021

@NuSkooler Added Element#show() and Element#hide() on v1.47.2.

1reaction
cronvelcommented, Feb 17, 2021

@NuSkooler I ran into a similar issue 2 weeks ago with blink, so I added a blinked event (it’s undocumented, but it is stable).

The blinked event passes all the argument of the submit event, so it can be used as a drop-in replacement for that.

EDIT: the name of the event is blinked not blink.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Header: Create a multi-column nested menu (Mega Navigation)
Creating a nested menu in the admin. Head to the navigation area of your Shopify admin https://myshopify.com/admin/menus; Create a new menu ...
Read more >
AngularJS ui-grid Nested Column Menu - Stack Overflow
ui-grid allows for column menus but they are added one on top of the other. I need to have nested menu items (like...
Read more >
Update A ColumnMenu's Items · Issue #150 · cronvel/terminal-kit ...
I couldn't find a function to update/add/remove the items in a ColumnMenu though it is completely possible I just ... Building "nested" ColumnMenu's...
Read more >
Mega Menu Builder - Shift4Shop App Store
Customize theme, color and width of your navigation bar. Utilize Tree Menus, Column Menus and Tabbed Menus. Add up to 3 levels of...
Read more >
Adding items to FilterControl.ColumnMenu that can be selected
Hi Peter, If I understand your task correctly you wish to add some nested properties to a FilterControl field context menu. If so,...
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