-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MeasureContent/handleChange doesn't get called in some cases, resulting in overflow #143
Comments
@DominickVale Thanks for reporting. I'm not able to see the video, can you try re-uploading? |
Reuploaded on youtube. https://youtu.be/ZHqyWNCVZ1w |
Interesting, a dump of the full logs would be helpful. It looks like it is not overflowing the display area, even when it goes off the screen. The |
You're right, sorry, i should've included it in the first place along with the code: // styles
const popOverModalStyles = {
popOver: {
backgroundColor: theme.colors.elevation.level4,
borderColor: theme.colors.outline,
borderBottomColor: theme.colors.outline,
borderWidth: 1,
borderRadius: 12,
},
arrowStyle: {
width: 0,
height: 0,
},
scrollStyle: {
padding: 16,
},
} // wrapper
export const PopoverSettings: React.FC<PopoverSettingsProps> = (props) => {
const { children, minWidth, ...popoverProps } = props
return (
<Popover
arrowSize={popOverModalStyles.arrowStyle}
popoverStyle={{ ...popOverModalStyles.popOver, minWidth }}
{...popoverProps}>
<ScrollView style={popOverModalStyles.scrollStyle} showsVerticalScrollIndicator={false}>
<InnerPopoverContainer>{children}</InnerPopoverContainer>
</ScrollView>
</Popover>
)
} // usage
<PopoverSettings
isVisible={isVisible}
minWidth={Dimensions.get('screen').width * 0.6}
debug
from={<SmallButton />}>
<>
<Text>Play at random intervals</Text>
{random && (
<TimeRandomWheel />
)}
<HorizontalMultiSliderOption />
<HorizontalMultiSliderOption />
<HorizontalMultiSliderOption />
//... The horizontalMultiSliders expand via conditional rendering of the children
|
Describe the bug
As title and video show, after recalculating the dimensions once it doesn't do it anymore... At first i thought it had some sort of maxHeight, but then i noticed that if the popover is opened with all 3 switches toggled and expanded, the height is calculated just fine, and i can even toggle them on and off without it overflowing...
Device/Setup Info:
react-native
version: 0.66.3react-native-popover-view
version: 5.0.0Screenshots
output.mp4
The text was updated successfully, but these errors were encountered: