diff options
Diffstat (limited to 'server/sonar-web/src/main/js/components/select-list/item.js')
-rw-r--r-- | server/sonar-web/src/main/js/components/select-list/item.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/components/select-list/item.js b/server/sonar-web/src/main/js/components/select-list/item.js index b7e1e49fb39..ecd5442c927 100644 --- a/server/sonar-web/src/main/js/components/select-list/item.js +++ b/server/sonar-web/src/main/js/components/select-list/item.js @@ -20,21 +20,21 @@ import React from 'react'; import Checkbox from '../controls/Checkbox'; -export default React.createClass({ - propTypes: { +export default class Item extends React.PureComponent { + static propTypes = { item: React.PropTypes.any.isRequired, renderItem: React.PropTypes.func.isRequired, selectItem: React.PropTypes.func.isRequired, deselectItem: React.PropTypes.func.isRequired - }, + }; - onCheck(checked) { + onCheck = checked => { if (checked) { this.props.selectItem(this.props.item); } else { this.props.deselectItem(this.props.item); } - }, + }; render() { const renderedItem = this.props.renderItem(this.props.item); @@ -50,4 +50,4 @@ export default React.createClass({ </li> ); } -}); +} |