Is there any way to have a sidebar popup scrollable?
scroll : true
works fine but only for a sidebar not for a popup when the sidebar is collapsed.
Is there any way to have a sidebar popup scrollable?
scroll : true
works fine but only for a sidebar not for a popup when the sidebar is collapsed.
Hello,
Please, check this sample: https://snippet.webix.com/llhumgvb
There getPopup
method were used to return the popup’s object and queryView
method to return menu view for scrolling
var menu = side.getPopup().queryView({view:"menu"});
To define scroll just need to work with menu(and submenu) configuration
webix.extend(menu.config.submenuConfig, {
height:102,
scroll:true
});
where config - defines configuration of a child submenu popup (if any). The configuration overrides the one defined via submenuConfig;
Thanks for the quick response.
I am using a slightly different menu.
It doesn’t work for me.
Could you check this example?
https://snippet.webix.com/6xggfgp7
Hello @VladML ,
To change some properties (such as height and so on) of the menu you should use the define
method. You will also need to remove autoheight
, which is set to true by default and provide some fixed height for the menu. Also, please use the resize() method to render the menu with new properties.
var menu = side.getPopup().queryView({view:"menu"});
menu.define({
height:200,
scroll:true,
autoheight:false
});
menu.resize();
Example: https://snippet.webix.com/xg3si55l