From 2deaf8ccb5dcfa88dca8e276ab19604a81e3e25c Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Thu, 8 Jun 2017 05:49:58 -0400 Subject: [PATCH] AccountCombobox: Fixup defaultProps the right way for ES6 --- js/components/AccountCombobox.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/components/AccountCombobox.js b/js/components/AccountCombobox.js index 8f7482b..c788907 100644 --- a/js/components/AccountCombobox.js +++ b/js/components/AccountCombobox.js @@ -5,15 +5,17 @@ var Combobox = require('react-widgets').Combobox; var getAccountDisplayList = require('../utils').getAccountDisplayList; class AccountCombobox extends React.Component { - constructor() { - super(); - this.onAccountChange = this.handleAccountChange.bind(this); - this.defaultProps = { + static get defaultProps() { + return { includeRoot: true, disabled: false, rootName: "New Top-level Account" } } + constructor() { + super(); + this.onAccountChange = this.handleAccountChange.bind(this); + } handleAccountChange(account) { if (this.props.onChange != null && account.hasOwnProperty('AccountId') &&