oblador/react-native-collapsible

Animated height starts at 0 when using collapsedHeight

Open

#218 创建于 2018年7月11日

在 GitHub 查看
 (11 评论) (7 反应) (0 负责人)JavaScript (449 fork)github user discovery
awaiting-replyhelp wanted

仓库指标

Star
 (2,589 star)
PR 合并指标
 (PR 指标待抓取)

描述

Hello,

As you can see, when using a collapsedHeight and then toggling the collapsible state, the animation always starts at 0 before expanding. collapsibleissue

My code, if it's of interest:

<Collapsible collapsed={isCollapsed} align="top" collapsedHeight={55}>
  <style={styles.interactionWrapper}>
    <GraphNode 
      isFirst={isFirst} 
      isLast={isLast} 
      width={35} 
      height={50} 
      strokeWidth={2} 
      containerLength={containerLength} 
      issueLevel={issueLevel} 
      index={index} 
      isEmail={isEmail} 
      isLetter={isLetter} 
      isEvent={isEvent} 
    />
    <View style={styles.descriptionsWrapper}>
      <Text style={styles.collapsedHeader}>{item.subject}</Text>
      <Text style={[styles.reason]}>{followupDescription}</Text>
      <EmailInteractionDetails 
        item={item} 
        index={index} 
        threadId={threadId}
        entityName={entityName}
        issueLevel={issueLevel}
        showEmail={this.showEmail.bind(this)}
        interactionContextMenuHandler={this.interactionContextMenuHandler.bind(this)} 
        toggleFollowupIsCompleted={this.toggleFollowupIsCompleted.bind(this)}
      />
    </View>
  </View>
</Collapsible>

I've looked through the library code and failed to spot the problem. Frankly, if it was obvious I think more people would have reported it, so far I've only seen it reported in issue #125.

I'm on version 0.12.0 and RN 0.54.2.

Any thoughts? Thanks

贡献者指南