ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3k stars 610 forks source link

[Bug] Cannot read property 'addListener' of undefined. This error is located at: in DefaultTabBar #1346

Closed WeldonLei closed 1 month ago

WeldonLei commented 1 month ago

💬 Before You Start

🙋 Description/Step to reproduce

使用Tabs组件renderTabBar属性,使用Tabs.DefaultTabBar,按照官网的属性要求,填写了必填属性: <Tabs tabs={tabs} renderTabBar={(tabProps: TabBarPropsType) => (

)}>

🔴 Version

5.1.3

💻 Environment

Android

⚫️ Output of npx react-native info

System: OS: Windows 10 10.0.19045 CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12400F Memory: 12.80 GB / 31.86 GB Binaries: Node: version: 18.18.2 path: C:\Program Files\nodejs\node.EXE Yarn: version: 1.22.19 path: C:\Program Files\nodejs\yarn.CMD npm: version: 9.8.1 path: C:\Program Files\nodejs\npm.CMD Watchman: version: 20231008.002904.0 path: C:\ProgramData\chocolatey\bin\watchman.EXE SDKs: Android SDK: API Levels:

Additional comments

No response

WeldonLei commented 1 month ago
  <Tabs
    tabs={tabs}
    renderTabBar={(tabBarProps: TabBarPropsType) => (
      <View>
        <Tabs.DefaultTabBar {...tabBarProps} />
        <TextInput />
      </View>
    )}></Tabs>
</View>