diff --git a/src/components/views/elements/PowerSelector.js b/src/components/views/elements/PowerSelector.js index 89d46de117..9b886e7cb3 100644 --- a/src/components/views/elements/PowerSelector.js +++ b/src/components/views/elements/PowerSelector.js @@ -73,8 +73,12 @@ module.exports = React.createClass({ _initStateFromProps: function(newProps) { // This needs to be done now because levelRoleMap has translated strings const levelRoleMap = Roles.levelRoleMap(newProps.usersDefault); - const options = Object.keys(levelRoleMap).filter((l) => { - return l === undefined || l <= newProps.maxValue; + const options = Object.keys(levelRoleMap).filter(level => { + return ( + level === undefined || + level <= newProps.maxValue || + level == newProps.value + ); }); const isCustom = levelRoleMap[newProps.value] === undefined; @@ -130,7 +134,7 @@ module.exports = React.createClass({ + value={String(this.state.customValue)} disabled={this.props.disabled} /> ); } else { // Each level must have a definition in this.state.levelRoleMap @@ -148,7 +152,7 @@ module.exports = React.createClass({ picker = ( + value={String(this.state.selectValue)} disabled={this.props.disabled}> {options} );