Skip to content

flexShrink: 1 in View is causing children not to expand via flex: 1 #443

@fivecar

Description

@fivecar

Great library - thanks for maintaining this!

Here's code that doesn't work (for me) as expected:

<ActionSheet contentContainerStyle={{flex: 1}}>
  <View style={{flex: 1}}>
    /* A bunch of vertically-expanding stuff */
  </View>
</ActionSheet>

This seems to come down to how props.children is wrapped with flexShrink: 1 in the library here. When I change that line instead to flex: 1, I get the desired behavior... though I'm sure the flexShrink: 1 was put there for a reason.

What is the right way to create an ActionSheet that contains, say, a big FlatList, where you want the ActionSheet to cap out at snap === 100, but always grow to as much vertical space as is allowed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions