Initial highlighting selected address - styling not final

This commit is contained in:
wmwragg 2016-09-06 16:39:50 +01:00
parent d1398b137a
commit 91b1c1f0fc

View File

@ -15,6 +15,7 @@ limitations under the License.
*/ */
var React = require("react"); var React = require("react");
var classNames = require('classnames');
var sdk = require("../../../index"); var sdk = require("../../../index");
var Invite = require("../../../Invite"); var Invite = require("../../../Invite");
var createRoom = require("../../../createRoom"); var createRoom = require("../../../createRoom");
@ -149,8 +150,13 @@ module.exports = React.createClass({
var queryList = []; var queryList = [];
if (this.state.queryList.length > 0) { if (this.state.queryList.length > 0) {
for (var i = 0; i <= maxSelected; i++) { for (var i = 0; i <= maxSelected; i++) {
var classes = classNames({
"mx_ChatInviteDialog_queryListElement": true,
"mx_ChatInviteDialog_selected": this.state.selected === i,
});
queryList.push( queryList.push(
<div className="mx_ChatInviteDialog_queryListElement" key={i} > <div className={classes} key={i} >
<AddressTile user={this.state.queryList[i]} canDismiss={false} /> <AddressTile user={this.state.queryList[i]} canDismiss={false} />
</div> </div>
); );