set sub list height with flex-basis to make it ... well, grow less
parent
d264687796
commit
44b92eb071
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -370,8 +370,9 @@ const RoomSubList = React.createClass({
|
|||
{this._getHeaderJsx()}
|
||||
</div>;
|
||||
} else {
|
||||
const heightEstimation = (len * 40) + 31;
|
||||
const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper");
|
||||
return <div className={"mx_RoomSubList"} style={{flexGrow: len}}>
|
||||
return <div className={"mx_RoomSubList"} style={{flexBasis: heightEstimation}}>
|
||||
{this._getHeaderJsx()}
|
||||
<GeminiScrollbarWrapper>
|
||||
{ content }
|
||||
|
|
|
@ -99,7 +99,6 @@ class Sizer {
|
|||
|
||||
class FlexSizer extends Sizer {
|
||||
setItemSize(item, size) {
|
||||
item.style.flexGrow = '0';
|
||||
item.style.flexBasis = `${Math.round(size)}px`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue