How to use this func toggleSlim?


Topic: How to use this func toggleSlim?

Rogelio Sanchez asked 5 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 5 years ago

and what do you want to do?


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Open

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