Select component not working inside modal
See original GitHub issueš Bug Report
Select component is not working inside react-nativeās modal. The options are rendered under the modal, so no items can be selected.
Select does not show options:
With opacity, the problem can be noticed:
To Reproduce
Put Select component inside a modal.
Expected behavior
Select component should work inside modal.
Link to runnable example or repository (highly encouraged)
import React from "react";
import { View, Modal } from "react-native";
import {
ApplicationProvider,
Layout,
Text,
Select,
} from "@ui-kitten/components";
import { mapping, light as lightTheme } from "@eva-design/eva";
const data = [{ text: "Option 1" }, { text: "Option 2" }, { text: "Option 3" }];
const HomeScreen = () => (
<Layout>
<Modal visible transparent>
<View
style={{
flex: 0,
padding: 100,
backgroundColor: "red",
opacity: 0.5,
}}
>
<Select data={data} onSelect={() => 0}></Select>
<Text style={{ marginTop: 10 }}>
Cannot select modals. The options are rendered under the modal.
</Text>
</View>
</Modal>
</Layout>
);
const App = () => (
<ApplicationProvider mapping={mapping} theme={lightTheme}>
<HomeScreen />
</ApplicationProvider>
);
export default App;
UI Kitten and Eva version
Package | Version |
---|---|
@eva-design/eva | 1.4.0 |
@ui-kitten/components | 4.4.1 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
Bootstrap-select not working inside modal
You have to reinitialize your Bootstrap-Select (.selectpicker) after loading your modal. The reason why this is happening is, your modal isĀ ...
Read more >Select component inside modal
I want to use the new select component inside a modal. The dropdown is not working like accepted. Generally it's there and I...
Read more >Angular Material Select wont open on modal - Experts Exchange
I have a modal form with a Angular Material dropdown select control that doesnt show the options if i place it on a...
Read more >react-select-in-modal
@atlaskit/modal-dialog. 10.0.6 Ā· react. ^16.2.0 (16.14.0) Ā· react-dom. ^16.2.0 (16.14.0) Ā· react-select. 3.0.4 Ā· styled-components.
Read more >Common problems
Select2 does not function properly when I use it inside a Bootstrap modal. ... This issue occurs because Bootstrap modals tend to steal...
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 FreeTop 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
Top GitHub Comments
Is there a solution for this?
Thatās unfortunate, since the native modalās (especially react-native-modalās) animation features outperform UI Kittenās version.
Would you @artyorsh be interested in a pull request that adds support to native modals? It would mean that you could add a separate component inside native modal that renders UI Kittenās modal inside native modal.