Topic: How to use this func toggleSlim?
Rogelio Sanchez free 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.)
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Opened
- ForumUser: 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
Piotr Glejzer staff commented 5 years ago
and what do you want to do?