question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Split into two modal and scrollview components

See original GitHub issue

Is your feature request related to a problem? Please describe. I want to try and embed a stack navigator inside a modalize component (with react-native-screens). This pattern happens in Apple Maps

Describe the solution you’d like If we could split the modal component into a modal container and scroll view component, this would be possible

There could be a combined <ScrollableModal /> that has the stuff you couldn’t do by default with the two component setup like size to content

Describe alternatives you’ve considered None. I don’t think what I want to do is yet possible

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Abdulrahman91khcommented, Aug 11, 2020

I want to use a normal View as the container of the content in modalize rather than a ScrollView, FlatList or SectionList so i can use my own FlatList along with react-navigation’s tab navigator. This is giving me a the Cannot use Virtualized List inside scrollView warning otherwise.

According to the documentation, you can use “customRenderer

Simply you can do something like const AnimatedComponent = ( <Animated.View style={{flex: 1}}> <FlatList .../> <AnotherComponent /> </Animated.View> )

Then you can do <Modalize ref={_modalRef} modalHeight={200} modalStyle={styles.modalStyle} overlayStyle={styles.overlayStyle} panGestureAnimatedValue={animated} customRenderer={AnimatedComponent} />

2reactions
joeyfigarocommented, Sep 9, 2020

…I managed to get the bottomsheet to finally render, but it throws an error every time.

and the return of my component:

const animated = React.useRef(new Animated.Value(0)).current

return (
    <Modalize
      ref={ref}
      panGestureAnimatedValue={animated}
      HeaderComponent={() => (
        <Header
          goBack={currentStep > 1}
          step={currentStepName}
          onGoBack={handleGoBack}
          onNext={handleNext}
        />
      )}
      customRenderer={<ContactsList contacts={device.contacts} />}
    />
  )

@jeremybarbet can you shed some light here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - How to scroll FlatList in Modal component?
Wrap the Flatlist inside a scrollview. It should work. <Scrollview> <Flatlist /> </ ...
Read more >
Creating performant scrollable stacks - Apple Developer
Implementing repeating views or groups of views can be as simple as wrapping them in an HStack or VStack inside a ScrollView ....
Read more >
How to create bottom sheet / modal like this one? (read first ...
I mean the Modalize library has its own scroll view so all you need to do is just pass a regular view with...
Read more >
Modal - Bootstrap
Clicking on the modal “backdrop” will automatically close the modal. Bootstrap only supports one modal window at a time. Nested modals aren't supported...
Read more >
ScrollView - NativeScript Docs
The ScrollableView component allows you to display a scrollable area in your ... When nesting ListView in ScrollView, make sure that the nested...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found