Resize room list scroll section.

This fix isn't perfect. Currently the scroll view is
slightly smaller than the list of rooms. I think it has something
to do with the how the heigh is calculate in js, considering it has
some assumptions about the height of each bar and the padding. However
room items are the only things which change with respect to the root
value. Therefore the item list is actually taller than the computed
pixel value of the list converted to rems.

I'll look into it.
This commit is contained in:
Jorik Schellekens 2020-04-06 20:52:36 +01:00
parent b921159da8
commit cef6868f02

View file

@ -32,6 +32,7 @@ import RoomTile from "../views/rooms/RoomTile";
import LazyRenderList from "../views/elements/LazyRenderList"; import LazyRenderList from "../views/elements/LazyRenderList";
import {_t} from "../../languageHandler"; import {_t} from "../../languageHandler";
import {RovingTabIndexWrapper} from "../../accessibility/RovingTabIndex"; import {RovingTabIndexWrapper} from "../../accessibility/RovingTabIndex";
import toRem from "../../utils/rem";
// turn this on for drop & drag console debugging galore // turn this on for drop & drag console debugging galore
const debug = false; const debug = false;
@ -383,7 +384,7 @@ export default class RoomSubList extends React.PureComponent {
setHeight = (height) => { setHeight = (height) => {
if (this._subList.current) { if (this._subList.current) {
this._subList.current.style.height = `${height}px`; this._subList.current.style.height = toRem(height);
} }
this._updateLazyRenderHeight(height); this._updateLazyRenderHeight(height);
}; };