summaryrefslogtreecommitdiffstats
path: root/web/react/components/file_attachment_list.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/file_attachment_list.jsx')
-rw-r--r--web/react/components/file_attachment_list.jsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/react/components/file_attachment_list.jsx b/web/react/components/file_attachment_list.jsx
index 33643de73..d93f461e8 100644
--- a/web/react/components/file_attachment_list.jsx
+++ b/web/react/components/file_attachment_list.jsx
@@ -8,8 +8,14 @@ var Constants = require('../utils/constants.jsx');
export default class FileAttachmentList extends React.Component {
constructor(props) {
super(props);
+
+ this.handleImageClick = this.handleImageClick.bind(this);
+
this.state = {startImgId: 0};
}
+ handleImageClick(e) {
+ this.setState({startImgId: parseInt($(e.target.parentNode).attr('data-img-id'), 10)});
+ }
render() {
var filenames = this.props.filenames;
var modalId = this.props.modalId;
@@ -40,9 +46,6 @@ export default class FileAttachmentList extends React.Component {
</div>
);
}
- handleImageClick(e) {
- this.setState({startImgId: parseInt($(e.target.parentNode).attr('data-img-id'), 10)});
- }
}
FileAttachmentList.propTypes = {