Topic: How to use this func toggleSlim?

Rogelio Sanchez free asked 3 years ago

Expected behavior I want to use this function: toggleSlim = () => { this.setState({ slim: !this.state.slim }); const sidenav = ReactDOM.findDOMNode(this.sideNavRef.current); sidenav.classList.toggle("slim"); };

It's exactly the function that this icon does, but I want to do it in another event.

Resources (screenshots, code snippets etc.)

enter image description here

Piotr Glejzer staff commented 3 years ago

and what do you want to do?

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.22.0
  • Device: MacBook Pro (13-inch, Mid 2012)
  • Browser: Google Chrome
  • OS: macOS Catalina
  • Provided sample code: No
  • Provided link: No