mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
don't scroll sub list header
This commit is contained in:
parent
0b615b21e2
commit
d264687796
@ -15,10 +15,15 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.mx_RoomSubList {
|
.mx_RoomSubList {
|
||||||
display: table;
|
min-height: 80px;
|
||||||
table-layout: fixed;
|
flex: 1;
|
||||||
width: 100%;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_RoomSubList_hidden {
|
||||||
|
flex: 0;
|
||||||
|
min-height: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSubList_resizer {
|
.mx_RoomSubList_resizer {
|
||||||
|
@ -57,8 +57,3 @@ limitations under the License.
|
|||||||
right: 60px;
|
right: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomList_itemsSubList {
|
|
||||||
min-height: 80px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -362,12 +362,22 @@ const RoomSubList = React.createClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.sortedList.length > 0 || this.props.extraTiles.length > 0) {
|
const len = this.state.sortedList.length + this.props.extraTiles.length;
|
||||||
const subList = this.state.hidden ? undefined : content;
|
|
||||||
return <div className={"mx_RoomSubList"}>
|
if (len) {
|
||||||
|
if (this.state.hidden) {
|
||||||
|
return <div className={["mx_RoomSubList", "mx_RoomSubList_hidden"]}>
|
||||||
{this._getHeaderJsx()}
|
{this._getHeaderJsx()}
|
||||||
{subList}
|
|
||||||
</div>;
|
</div>;
|
||||||
|
} else {
|
||||||
|
const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper");
|
||||||
|
return <div className={"mx_RoomSubList"} style={{flexGrow: len}}>
|
||||||
|
{this._getHeaderJsx()}
|
||||||
|
<GeminiScrollbarWrapper>
|
||||||
|
{ content }
|
||||||
|
</GeminiScrollbarWrapper>
|
||||||
|
</div>;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const Loader = sdk.getComponent("elements.Spinner");
|
const Loader = sdk.getComponent("elements.Spinner");
|
||||||
if (this.props.showSpinner) {
|
if (this.props.showSpinner) {
|
||||||
|
@ -505,13 +505,8 @@ module.exports = React.createClass({
|
|||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
|
|
||||||
_collectGemini(gemScroll) {
|
|
||||||
this._gemScroll = gemScroll;
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
const RoomSubList = sdk.getComponent('structures.RoomSubList');
|
const RoomSubList = sdk.getComponent('structures.RoomSubList');
|
||||||
const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper");
|
|
||||||
|
|
||||||
// XXX: we can't detect device-level (localStorage) settings onChange as the SettingsStore does not notify
|
// XXX: we can't detect device-level (localStorage) settings onChange as the SettingsStore does not notify
|
||||||
// so checking on every render is the sanest thing at this time.
|
// so checking on every render is the sanest thing at this time.
|
||||||
@ -537,10 +532,7 @@ module.exports = React.createClass({
|
|||||||
const {key, label, ... otherProps} = props;
|
const {key, label, ... otherProps} = props;
|
||||||
const chosenKey = key || label;
|
const chosenKey = key || label;
|
||||||
|
|
||||||
let subList = <GeminiScrollbarWrapper style={{flexGrow: len}} className={"mx_RoomList_itemsSubList"} key={chosenKey}>
|
let subList = <RoomSubList key={chosenKey} label={label} {...otherProps} />;
|
||||||
{ <RoomSubList label={label} {...otherProps} /> }
|
|
||||||
</GeminiScrollbarWrapper>;
|
|
||||||
|
|
||||||
if (!isLast) {
|
if (!isLast) {
|
||||||
return components.concat(
|
return components.concat(
|
||||||
subList,
|
subList,
|
||||||
|
Loading…
Reference in New Issue
Block a user