Comments (6)
The following solution works fine for me to get the height from native layout property and set the height from state.
<View style={[styles.panel, { height: this.state.bsHeight }]} onLayout={(event) => { this.find_dimesions(event.nativeEvent.layout) }}>
find_dimesions(layout) {
const { x, y, width, height } = layout;
this.setState({
bsHeight: height
})
}
Thanks for your support @roshangm1 and thanks @osdnk for the awesome library.
from react-native-reanimated-bottom-sheet.
Are you giving height for the parent inside renderInner
? What is the style for styles.panel
in your gist example ?
from react-native-reanimated-bottom-sheet.
@roshangm1 - Yes I am setting the height of the panel as screen height. So, the scroll works for the height that we define?
from react-native-reanimated-bottom-sheet.
Yes, that might be the case. You can try giving height 100%.
from react-native-reanimated-bottom-sheet.
Tried 100%, but the scroll is completely not working. Turns out we have to set the height correctly to view all the content inside the scroll view. But the problem with my usecase is I will be loading the content dynamically and we can't define a height. I will try to find if there is a way to detect the height of a holder programatically and apply that height to the panel. Please suggest If you have any other solution in the meantime.
Thanks @roshangm1
from react-native-reanimated-bottom-sheet.
I usually set the height to be the height of the device (from Dimensions api). This results in blank spaces when not enough content however.
@osdnk and @everyone any thoughts on this ?
from react-native-reanimated-bottom-sheet.
Related Issues (20)
- Bottomsheet is under other components
- use in react js app HOT 1
- Bottomsheet automatically opening and closing on rotation HOT 1
- how to scroll list to the bottom? HOT 1
- Overlay HOT 2
- Property 'snapToIndex' does not exist on type 'never'.ts(2339) HOT 2
- Is the package still maintained? HOT 1
- BottomSheet is overlapping the Content
- can't run in RN-cli HOT 1
- enabledGestureInteraction Prop
- not working in RN 0.69 HOT 4
- FlatList wont Scroll Till end of screen HOT 4
- Is this community still active? HOT 1
- BottomSheet import from react-native-reanimated-bottom-sheet is not available in RN 0.69.1 HOT 1
- Drag not working at all
- Preventing keyboard from dismissing with FlatList in BottomSheet
- How to set content height dynamically based on content?
- export 'default'.'Code' (imported as 'Animated') was not found in 'react-native-reanimated' HOT 2
- reanimated-bottom-sheet & react-native-reanimated HOT 4
- Cannot read property 'prototype' of undefined HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-reanimated-bottom-sheet.