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

[Bug] android下Tabs,点击tab不会调用onChange方法,iOS会调用 #1319

Open
1 task done
wangvili opened this issue Nov 24, 2023 · 0 comments
Open
1 task done
Labels

Comments

@wangvili
Copy link

💬 前提强调

  • I have searched the issues of this repository and believe that this is not a duplicate.

🙋 描述详情/重现步骤

Tabs下都是FlatList页面,android下点击
使用默认的tabs包裹,没有自定义randerTab

changetabs = (value, index) => {
console.log('changetabs', index, value);
}

          tabs={tabData}
          initialPage={0}
          onTabClick={this.onTabClick}
          onChange={this.changetabs} //android点击tab怎么不触发啊
          tabBarPosition="top"
          tabBarUnderlineStyle={{backgroundColor: '#FF8000'}}>
          ...
          </Tabs>
          ```
          点击tab时,changetabs的log不会打印

### 💻 运行环境

iOS, Android

### ⚫️ `npx react-native info`输出信息

System:
  OS: macOS 13.5.2
  CPU: (10) arm64 Apple M2 Pro
  Memory: 86.80 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.0.0
    path: /var/folders/kb/p5p48sk13csbptrctf07nlt00000gn/T/yarn--1700794252506-0.4000835605250852/node
  Yarn:
    version: 1.22.19
    path: /var/folders/kb/p5p48sk13csbptrctf07nlt00000gn/T/yarn--1700794252506-0.4000835605250852/yarn
  npm:
    version: 9.8.1
    path: /opt/homebrew/bin/npm
  Watchman:
    version: HEAD-fcdc2f1
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.13.0
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "33"
      - "33"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 29.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.2
      - 34.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
      - android-UpsideDownCake | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2022.1 AI-221.6008.13.2211.9619390
  Xcode:
    version: 15.0.1/15A507
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.18
    path: /usr/bin/javac
  Ruby:
    version: 3.0.0
    path: /Users/inkcrazy/.rvm/rubies/ruby-3.0.0/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.4
    wanted: 0.72.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

### 补充说明

无
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant