From 44b92eb0713772fa8d8d893b5719cfaf647eb846 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 18 Oct 2018 16:57:47 +0200 Subject: [PATCH] set sub list height with flex-basis to make it ... well, grow less --- res/css/structures/_RoomSubList.scss | 3 +-- src/components/structures/RoomSubList.js | 3 ++- src/resizer/sizer.js | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/res/css/structures/_RoomSubList.scss b/res/css/structures/_RoomSubList.scss index 72b8ed4436..baecc62b2a 100644 --- a/res/css/structures/_RoomSubList.scss +++ b/res/css/structures/_RoomSubList.scss @@ -16,13 +16,12 @@ limitations under the License. .mx_RoomSubList { min-height: 80px; - flex: 1; + flex: 0; display: flex; flex-direction: column; } .mx_RoomSubList_hidden { - flex: 0; min-height: unset; } diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 4976d3e211..e8cf5c4273 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -370,8 +370,9 @@ const RoomSubList = React.createClass({ {this._getHeaderJsx()} ; } else { + const heightEstimation = (len * 40) + 31; const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper"); - return
+ return
{this._getHeaderJsx()} { content } diff --git a/src/resizer/sizer.js b/src/resizer/sizer.js index fb4e860d4e..4ae35e020a 100644 --- a/src/resizer/sizer.js +++ b/src/resizer/sizer.js @@ -99,7 +99,6 @@ class Sizer { class FlexSizer extends Sizer { setItemSize(item, size) { - item.style.flexGrow = '0'; item.style.flexBasis = `${Math.round(size)}px`; } }