mirror of
				https://github.com/aclindsa/moneygo.git
				synced 2025-11-04 02:23:26 -05:00 
			
		
		
		
	AccountCombobox: Fixup defaultProps the right way for ES6
This commit is contained in:
		@@ -5,15 +5,17 @@ var Combobox = require('react-widgets').Combobox;
 | 
				
			|||||||
var getAccountDisplayList = require('../utils').getAccountDisplayList;
 | 
					var getAccountDisplayList = require('../utils').getAccountDisplayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class AccountCombobox extends React.Component {
 | 
					class AccountCombobox extends React.Component {
 | 
				
			||||||
	constructor() {
 | 
						static get defaultProps() {
 | 
				
			||||||
		super();
 | 
							return {
 | 
				
			||||||
		this.onAccountChange = this.handleAccountChange.bind(this);
 | 
					 | 
				
			||||||
		this.defaultProps = {
 | 
					 | 
				
			||||||
			includeRoot: true,
 | 
								includeRoot: true,
 | 
				
			||||||
			disabled: false,
 | 
								disabled: false,
 | 
				
			||||||
			rootName: "New Top-level Account"
 | 
								rootName: "New Top-level Account"
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						constructor() {
 | 
				
			||||||
 | 
							super();
 | 
				
			||||||
 | 
							this.onAccountChange = this.handleAccountChange.bind(this);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	handleAccountChange(account) {
 | 
						handleAccountChange(account) {
 | 
				
			||||||
		if (this.props.onChange != null &&
 | 
							if (this.props.onChange != null &&
 | 
				
			||||||
				account.hasOwnProperty('AccountId') &&
 | 
									account.hasOwnProperty('AccountId') &&
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user