Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #320 from matrix-org/rav/fix_room_setting_warnings
Browse files Browse the repository at this point in the history
Fix a pair of warnings from RoomSettings
  • Loading branch information
dbkr committed Jun 23, 2016
2 parents e741226 + 7a7d7c0 commit 38a1a0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/views/elements/PowerSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ module.exports = React.createClass({

propTypes: {
value: React.PropTypes.number.isRequired,

// if true, the <select/> should be a 'controlled' form element and updated by React
// to reflect the current value, rather than left freeform.
// MemberInfo uses controlled; RoomSettings uses non-controlled.
controlled: React.PropTypes.bool.isRequired,
//
// ignored if disabled is truthy. false by default.
controlled: React.PropTypes.bool,

// should the user be able to change the value? false by default.
disabled: React.PropTypes.bool,
onChange: React.PropTypes.func,
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/RoomSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = React.createClass({
tags_changed: false,
tags: tags,
areNotifsMuted: areNotifsMuted,
isRoomPublished: this._originalIsRoomPublished, // loaded async in componentWillMount
isRoomPublished: false, // loaded async in componentWillMount
};
},

Expand Down

0 comments on commit 38a1a0b

Please sign in to comment.