src/components/List.js
// Toggles the list's height. Used by fold menu type.
Toggles the list's height. Used by fold menu type.
Toggles the list ' s height . Used by fold menu type .
toggleHeight() {
    const syncHeight = () => {
      this.elements.wrapper.style.height =
        this.elements.list.clientHeight + 'px';
    };
    if (this.props.expanded) {
      this.elements.wrapper.addEventListener('transitionend', this.autoHeight);
      syncHeight();
    } else {
      this.elements.wrapper.removeEventListener(
        'transitionend',
        this.autoHeight
      );
      syncHeight();
      setTimeout(() => {
        this.elements.wrapper.style.height = '0';
      }, 10); 
    }
  }
toggleHeight ( ) { const syncHeight = ( ) => { this . elements . wrapper . style . height = this . elements . list . clientHeight + 'px' ; } ; if ( this . props . expanded ) { this . elements . wrapper . addEventListener ( 'transitionend' , this . autoHeight ) ; syncHeight ( ) ; } else { this . elements . wrapper . removeEventListener ( 'transitionend' , this . autoHeight ) ; syncHeight ( ) ; setTimeout ( ( ) => { this . elements . wrapper . style . height = '0' ; } , 10 ) ; } }
Toggles the list's height.
Toggles the list ' s height .
// Clearing only the stack with 0 didn't help. Might be a V8 optimization issue.