javascript - How to make materialize Dropdown work in React? -
how make materialize dropdown work in react?
<a classname='dropdown-button btn' href='#' data-activates='dropdown1'>drop me!</a> <ul id='dropdown1' classname='dropdown-content'> <li><a href="#!">one</a></li> <li><a href="#!">two</a></li> <li classname="divider"></li> <li><a href="#!">three</a></li> </ul>
materialize dropdown documentation
i've included materialize.js that's taken care of. i'm guessing it's data-activates
attribute. i'm not getting error, there other way declare attribute make work in react?
try dataactivates.
<a classname='dropdown-button btn' href='#' dataactivates='dropdown1'>drop me!</a>
ok, found @ react.docs;
react supports data-* , aria-* attributes every attribute in following lists.
note: attributes camel-cased , attributes class , classname , htmlfor, respectively, match dom api specification. list of events, see supported events.
Comments
Post a Comment