Expand/Collapse Sidebar using a microflow/nanoflow?

0
Is it possible to expand and collapse sidebar with a button?
asked
2 answers
0

You can always use some JavaScript within a Nanonflow.

 

This code will toggle the toggle-btn for you. I'm assuming you only have one .toggle-btn on the page.

// Select all elements with the class .toggle-btn
var toggleBtns = document.querySelectorAll('.toggle-btn');

// Iterate through the NodeList and simulate a click on each element
toggleBtns.forEach(function(toggleBtn) {
  toggleBtn.click();
});

 

Good luck!

answered
0

Yes that is possible, see the documentation on this subject here: https://docs.mendix.com/refguide7/sidebar-toggle-button/

answered