move closer to usage

This commit is contained in:
Bruno Windels 2018-10-19 14:44:37 +02:00
parent 8f71210bdf
commit acd383c6a9

View file

@ -309,7 +309,6 @@ const RoomSubList = React.createClass({
); );
} }
const tabindex = this.props.searchFilter === "" ? "0" : "-1";
const len = this.state.sortedList.length + this.props.extraTiles.length; const len = this.state.sortedList.length + this.props.extraTiles.length;
let chevron; let chevron;
if (len) { if (len) {
@ -321,6 +320,7 @@ const RoomSubList = React.createClass({
chevron = (<div className={chevronClasses}></div>); chevron = (<div className={chevronClasses}></div>);
} }
const tabindex = this.props.searchFilter === "" ? "0" : "-1";
return ( return (
<div className="mx_RoomSubList_labelContainer" title={ title } ref="header"> <div className="mx_RoomSubList_labelContainer" title={ title } ref="header">
<AccessibleButton onClick={ this.onClick } className="mx_RoomSubList_label" tabIndex={tabindex}> <AccessibleButton onClick={ this.onClick } className="mx_RoomSubList_label" tabIndex={tabindex}>