问题
Tabs from material-ui are unclickable. Nothing happens then i click on them. Code is just simple:
`var Tabs = React.createClass ({
render: function() {
return (
<Tabs>
<Tab label="1">
<p>hello 1</p>
</Tab>
<Tab label="2"/>
<p>hello 2</p>
</Tab>
</Tabs>
);
}
});`
But on the page i see theese tabs with first tab opened and then i click on the second nothing happens. Tried different browsers. What could go wrong?
回答1:
You must add this code:
var injectTapEventPlugin = require("react-tap-event-plugin");
injectTapEventPlugin();
I wonder why it is not explicitly mentioned in their examples.
来源:https://stackoverflow.com/questions/35190548/material-ui-tabs-unclickable