Question on submenu item capabilities

Hi,

Please have a look at this snippet: Code Snippet

I have two questions that I’m hoping someone can answer.

First, notice how for items 1 and 2 in the submenu I have one configured as disabled:true and one configured as hidden:true, but unfortunately those do not seem to have the desired effect. I can call disableItem() or hideItem() after the fact as I demonstrate, but is it not possible to have items initially disabled or hidden via configuration like I’ve tried?

Second, and this is more minor, but notice how the menu’s arrow points to the bottom right corner of the triggering top-level menu item? I’d prefer it if it was pointed at the middle, centered nicely. Is there a way to achieve that?

Thanks!
Frank

Hi Frank,

  1. Desired functionality is planned for the next version (4.4 is scheduled for the end of June).
    As a quick workaround, you can use ready handler to iterate through the data items and disable/hide them depending on some flag: https://webix.com/snippet/2737d872

  2. It’s a part of the global inner logic that cannot be customized, unfortunately. We will look into this, but I won’t promise any changes in the nearest release.

Excellent, thanks very much! I wound up with an almost identical approach to handle #1, and #2 is just a nice-to-have, not a big problem at all.