Skip to content
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

TabView inside a Popover #785

Closed
fatihyildizhan opened this issue Dec 24, 2019 · 4 comments
Closed

TabView inside a Popover #785

fatihyildizhan opened this issue Dec 24, 2019 · 4 comments
Labels
🤷‍♂️ Needs info There is no enough info to resolve the issue

Comments

@fatihyildizhan
Copy link

fatihyildizhan commented Dec 24, 2019

🐛 Bug Report

I am getting:

Malformed calls from JS: field sized are different.
[ExpoErrorRecovery".0,[null],.........]

To Reproduce

export const TabViewSimpleUsageShowcase = () => {

  const [selectedIndex, setSelectedIndex] = React.useState(0);

  return (
    <TabView
      selectedIndex={selectedIndex}
      onSelect={setSelectedIndex}>
      <Tab title='USERS'>
        <Layout style={styles.tabContainer}>
          <Text>List of users.</Text>
        </Layout>
      </Tab>
      <Tab title='ORDERS'>
        <Layout style={styles.tabContainer}>
          <Text>List of orders.</Text>
        </Layout>
      </Tab>
      <Tab title='TRANSACTIONS'>
        <Layout style={styles.tabContainer}>
          <Text>List of transactions.</Text>
        </Layout>
      </Tab>
    </TabView>
  );
};

const styles = StyleSheet.create({
  tabContainer: {
    minHeight: 64,
  },
});


return (
    <Popover
      visible={visible}
      content={TabViewSimpleUsageShowcase()}
      onBackdropPress={togglePopover}>
      <Button onPress={togglePopover}>
        TOGGLE POPOVER
      </Button>
    </Popover>
  );

Expected behavior

I need to show TabView inside in the Popover.

UI Kitten and Eva version

Package Version
@eva-design/eva 1.3.1
@ui-kitten/components 4.3.2

Environment information

  • Windows 10
  • react-native: 16.9.0
  • expo: 36.0.0
@artyorsh artyorsh added the 🤷‍♂️ Needs info There is no enough info to resolve the issue label Dec 24, 2019
@artyorsh
Copy link
Collaborator

Can you please provide the whole code?

@fatihyildizhan
Copy link
Author

@artyorsh I copy and pasted TabViewSimpleUsageShowcase on the same file with a popover.

I also tried to put TabView directly into a popover. The error is same too.

return (
    <Popover
      visible={visible}
      content={
<TabView
      selectedIndex={selectedIndex}
      onSelect={setSelectedIndex}>
      <Tab title='USERS'>
        <Layout style={styles.tabContainer}>
          <Text>List of users.</Text>
        </Layout>
      </Tab>
      <Tab title='ORDERS'>
        <Layout style={styles.tabContainer}>
          <Text>List of orders.</Text>
        </Layout>
      </Tab>
      <Tab title='TRANSACTIONS'>
        <Layout style={styles.tabContainer}>
          <Text>List of transactions.</Text>
        </Layout>
      </Tab>
    </TabView>
}
      onBackdropPress={togglePopover}>
      <Button onPress={togglePopover}>
        TOGGLE POPOVER
      </Button>
    </Popover>
  );

@artyorsh
Copy link
Collaborator

Well, I don't know why, but this is reproducible. I'll investigate it later
Please ping if you will resolve this somehow

@artyorsh
Copy link
Collaborator

artyorsh commented Feb 6, 2020

Probably, the same issue as #826

@artyorsh artyorsh closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷‍♂️ Needs info There is no enough info to resolve the issue
Projects
None yet
Development

No branches or pull requests

2 participants