Open imeidopf opened 10 months ago
I've replicated this issue in the starter app, AwesomeProject, that React Native showcases in their docs. reactNativeElements-main.zip
I got a same problem and I found the answer when testing on https://snack.expo.dev/TeR_zOjmY . Seems TabView from rneui doesn't work with View component from react-native. The solution: remove out all components from react-native and replace by elements from rneui. In the example above, we can replace
Is there an existing issue for this?
Explain what you did
`import { Component, ReactNode, createElement } from "react"; import { Text, View } from "react-native"; import { Tab, TabView } from '@rneui/themed';
import { mergeNativeStyles } from "@mendix/pluggable-widgets-tools";
import { CustomStyle } from "../ReactNativeElementsTabs"; import { TabArrayType } from "typings/ReactNativeElementsTabsProps";
export interface TabContainerProps { name?: string; tabArray: TabArrayType[]; style: CustomStyle[]; }
interface TabContainerState { index: number; }
const defaultStyle: CustomStyle = { container: {}, label: { color: "#F6BB42" } };
export class TabContainer extends Component<TabContainerProps, TabContainerState> { constructor(props: TabContainerProps) { super(props); this.state = { index: 0 }; }
}`
Expected behavior
TabView height would respond to the content within.
Describe the bug
Unless I give the TabView component a height, there is no height. If I place the TabView.Item children in a view, then I get something but the children render over each other and overflow the parent container.
Steps To Reproduce
Screenshots
Your Environment
`npx @rneui/envinfo`
``` Output from `npx @rneui/envinfo` goes here. ```