bound handleClickImage function
Этот коммит содержится в:
@@ -8,8 +8,14 @@ var Constants = require('../utils/constants.jsx');
|
|||||||
export default class FileAttachmentList extends React.Component {
|
export default class FileAttachmentList extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
this.handleImageClick = this.handleImageClick.bind(this);
|
||||||
|
|
||||||
this.state = {startImgId: 0};
|
this.state = {startImgId: 0};
|
||||||
}
|
}
|
||||||
|
handleImageClick(e) {
|
||||||
|
this.setState({startImgId: parseInt($(e.target.parentNode).attr('data-img-id'), 10)});
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
var filenames = this.props.filenames;
|
var filenames = this.props.filenames;
|
||||||
var modalId = this.props.modalId;
|
var modalId = this.props.modalId;
|
||||||
@@ -40,9 +46,6 @@ export default class FileAttachmentList extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
handleImageClick(e) {
|
|
||||||
this.setState({startImgId: parseInt($(e.target.parentNode).attr('data-img-id'), 10)});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FileAttachmentList.propTypes = {
|
FileAttachmentList.propTypes = {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user