Standardizing bracket syntax

This commit is contained in:
James Barnsley
2017-10-10 13:05:28 +13:00
parent 0ca37b0f62
commit 2ffa337ffa
116 changed files with 7451 additions and 3246 deletions

View File

@ -6,7 +6,7 @@ import FontAwesome from 'react-fontawesome'
export default class DropdownField extends React.Component{
constructor(props) {
constructor(props){
super(props);
this.state = {
@ -25,14 +25,14 @@ export default class DropdownField extends React.Component{
handleClick(e){
// TODO: remove dependency on jQuery and explore the performance of this functionality
if( $(e.target).closest('.dropdown-field').data('key') != this.props.name.replace(' ','_').toLowerCase() && this.state.expanded ){
if ($(e.target).closest('.dropdown-field').data('key') != this.props.name.replace(' ','_').toLowerCase() && this.state.expanded){
this.setState({ expanded: false })
}
}
handleChange(value){
this.setState({ expanded: !this.state.expanded })
return this.props.handleChange( value )
return this.props.handleChange(value )
}
handleToggle(){
@ -65,7 +65,7 @@ export default class DropdownField extends React.Component{
</div>
<div className="options">
{
this.props.options.map( option => {
this.props.options.map(option => {
return (
<div className="option" key={ option.value } onClick={ e => this.handleChange(option.value) }>
{option.value == current_value ? icon : null}