You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
create sizer that sets item size with flex-basis
works with the flex-grow we set initially for the sub lists
This commit is contained in:
@@ -97,4 +97,11 @@ class Sizer {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {Sizer};
|
||||
class FlexSizer extends Sizer {
|
||||
setItemSize(item, size) {
|
||||
item.style.flexGrow = '0';
|
||||
item.style.flexBasis = `${Math.round(size)}px`;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {Sizer, FlexSizer};
|
||||
|
||||
Reference in New Issue
Block a user