React-native-collapsible: Unable to scroll using <ScrollView> inside <Accordion>.

Created on 24 Jul 2017  路  5Comments  路  Source: oblador/react-native-collapsible

I have a lengthy list of radio buttons with yes/no options. But, the problem here is I am unable to scroll down to the list , so, Is there any way that I can insert ScrollView at the begin and end of the list of radio buttons
ScrollView
Radio/
Radio /
.
.
.
.
Radio /
/ScrollView

Most helpful comment

Solved: Able to scroll inside the accordion after making the height of the wrapper View smaller than the height of ScrollView.

`

<`View style={{flex:1, height:height *0.6 }}>

     <Text>{'HEADING 1'}</Text>
    <ScrollView style={{ height:height *0.7 }}>
    <Accordion
    style={{borderColor:'gray', borderWidth:2}}
      sections={this.SECTION}
      renderHeader={this.renderHeader}
      renderContent={this.renderContent}
    />
    </ScrollView> 

  </View>

`

All 5 comments

I wrapped complete radio list rendering component inside ScrollView component of react-native, but it doesn't scrolls.

Solved: Able to scroll inside the accordion after making the height of the wrapper View smaller than the height of ScrollView.

`

<`View style={{flex:1, height:height *0.6 }}>

     <Text>{'HEADING 1'}</Text>
    <ScrollView style={{ height:height *0.7 }}>
    <Accordion
    style={{borderColor:'gray', borderWidth:2}}
      sections={this.SECTION}
      renderHeader={this.renderHeader}
      renderContent={this.renderContent}
    />
    </ScrollView> 

  </View>

`

@abdulkhaliquem9 thanks your solution worked.

Solved: Able to scroll inside the accordion after making the height of the wrapper View smaller than the height of ScrollView.

`

<`View style={{flex:1, height:height *0.6 }}>

     <Text>{'HEADING 1'}</Text>
    <ScrollView style={{ height:height *0.7 }}>
    <Accordion
    style={{borderColor:'gray', borderWidth:2}}
      sections={this.SECTION}
      renderHeader={this.renderHeader}
      renderContent={this.renderContent}
    />
    </ScrollView> 

  </View>

`

What is the height variable here?

VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead. I get this error when I apply your method.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tiaaaa123 picture tiaaaa123  路  5Comments

xxstefanoxx picture xxstefanoxx  路  4Comments

jayellul picture jayellul  路  5Comments

technicallyty picture technicallyty  路  4Comments

vijay-dadhich09 picture vijay-dadhich09  路  8Comments