We would like to customize the collapse/expand button in the navigation sidebar using our custom icon and text.
Is it possible to override the collapse/expand button with custom one?
We would like to customize the collapse/expand button in the navigation sidebar using our custom icon and text.
Is it possible to override the collapse/expand button with custom one?
Hello @olzhas,
Is it possible to override the collapse/expand button with custom one?
You can customize the filemanager component via the onViewInit
event handler, which allows you to catch the moment before a view inside of the filemanager is initialized. With this handler you are able to modify the default config of the said views.
For instance, in your case, you can catch the moment the relevant buttons are initialized and change their label (which allows you to display any html content you want, for example, an icon): https://snippet.webix.com/5dom7nf8.
Hey @Dzmitry. Thanks for the reply!
Sorry, I think my definition of that button was ambiguous since our implementation does not have those expandAll
, collapseAll
buttons. I was indeed referring to Hide Tree
button.
So I was able to override Hide tree
button in onViewInit
, but I could not override the Show tree
button.
The button you need is located in the sidePanel
view - https://snippet.webix.com/tkapve91. Basically, this button is initialized as a part of a more complex layout, and is not being called separately in the onViewInit
handler.