Modal doesn't work properly
See original GitHub issueIssue type
I’m submitting a … (check one with “x”)
- bug report
- feature request
Issue description
Current behavior:
Modal won’t show up unless set isBackDropAllowed
to true
Expected behavior: Modal should show up.
Steps to reproduce:
Set up Modal to be like… ApplicationProvider > Layout > Modal but it’s not showing. Found out adding isBackDropAllowed
will display it.
Related code:
export class HomeScreen extends React.Component {
// ... incomplete code snippet
styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
padding: 20
},
text: {
marginVertical: 16,
},
modalBackdrop: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#000000AA',
padding: 20,
alignSelf: 'stretch'
},
modalInner: {
backgroundColor: 'white',
padding: 40,
paddingTop: 32,
paddingBottom: 16,
borderRadius: 10,
}
});
render() {
return (
<ApplicationProvider mapping={mapping} theme={lightTheme}>
<Layout style={this.styles.container} level='4'>
<Text style={this.styles.text} category='h5'>...</Text>
<Input label={"Type in here"} multiline height={120}/>
<Button size={"small"} style={{"marginTop":20}}>Send!</Button>
<Modal
visible={this.state.modalVisible}
isBackDropAllowed
style={this.styles.modalBackdrop}
>
<Layout>
<View style={this.styles.modalInner}>
<Text style={{'textAlign':'center'}}>...</Text>
<Button size={"small"} style={{"marginTop":20}}>...</Button>
<Button appearance="ghost" size={"small"} style={{"marginTop":5,"paddingBottom":0}}>...</Button>
</View>
</Layout>
</Modal>
</Layout>
</ApplicationProvider>
)
}
}
Other information:
OS, device, package version
OS: MacOS
Device: Expo + xCode Emulator
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
bootstrap modal not working at all - Stack Overflow
This was the issue for me as well. It seems the bootstrap team has not updated their own site with the new syntax....
Read more >Modal not working - Material Design for Bootstrap
Hi, I'm having issues with modals in MCbootstrap. ... Topic: Modal not working ... If I open the file and remove display: none,...
Read more >Bootstrap 5 modal not working (solved) on Codeply
Bootstrap modal not showing because the data- attributes should be data-bs-toggle and data-bs-target to open the modal Codeply example.
Read more >scrollable doesn't work on modals with component as content
When using a component as the content of a modal rather than a template, with the scrollable option set to true, the modal...
Read more >Modal · Bootstrap v4.6
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
“cannot press the “Hide Modal” button” Your live example on snack won’t work either. Please check my screen record
@artyorsh I’m using expo example project from “expo init my-new-project” with tabs and added react-native-ui-kitten v4.2.0 like in Add into existing project . Code in home screen like this:
My first attempt was a month ago (not sure the version) and it did not show at all. Now it shows but cannot press the “Hide Modal” button on the modal and it can press the tabs under the modal. Using
allowBackdrop={true}
will mitigate the issue.