Обновление: я обнаружил, что ModalTrigger устарел: 1b1af04 [изменено] устарело
Сейчас я расследую это.
У меня проблемы с реакцией-бутстрап ModalTrigger. Следующее использование работает, но после обновления до
"react-bootstrap": "^0.25.1",
"react": "^0.13.3",
Я получаю следующую ошибку: Uncaught TypeError: Не удается прочитать свойство toUpperCase неопределенного
Ты знаешь почему?
export default class Test extends React.Component {
constructor(props) {
super(props);
this.close = this.close.bind(this);
}
close(){
this.setState({ showModal: false });
}
render() {
var mymodal = (
<Modal show={true} onHide={this.close}>
<Modal.Header closeButton>
<Modal.Title>Modal heading</Modal.Title>
</Modal.Header>
<Modal.Body>
<h4>Text</h4>
</Modal.Body>
<Modal.Footer>
<Button onClick={this.close}>Close</Button>
</Modal.Footer>
</Modal>
)
return (
<Table striped bordered condensed hover>
<thead>
<tr>
<th>
<ModalTrigger key='modalinput' modal={mymodal}>
<Button style={buttonStyle}>
<span className="glyphicon glyphicon-plus" aria-hidden="true"></span>
</Button>
</ModalTrigger>
</th>
<th>X</th>
<th>Y</th>
</tr>
</thead>
<tbody>
</tbody>
</Table>
);
} // Render
}; // Component