mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 23:40:28 +05:30
#22: Fix height jumps in Collapsed
This commit is contained in:
parent
e2e43e6e8f
commit
08cf6d38b8
@ -34,12 +34,11 @@ export default class Collapse extends Component<Props, {
|
||||
}
|
||||
|
||||
render() {
|
||||
// TODO: @SleepWalker сейчас при первой отрисовке можно увидеть дёргание родительского блока. Надо пофиксить.
|
||||
const { isOpened, children, onRest } = this.props;
|
||||
const { height, wasInitialized } = this.state;
|
||||
|
||||
return (
|
||||
<div className={styles.overflow}>
|
||||
<div className={styles.overflow} style={wasInitialized ? {} : { height: 0 }}>
|
||||
<MeasureHeight
|
||||
state={this.shouldMeasureHeight()}
|
||||
onMeasure={this.onUpdateHeight}
|
||||
@ -56,7 +55,6 @@ export default class Collapse extends Component<Props, {
|
||||
style={{
|
||||
marginTop: top,
|
||||
visibility: wasInitialized ? 'inherit' : 'hidden',
|
||||
// height: wasInitialized ? 'auto' : 0,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
Loading…
Reference in New Issue
Block a user