iOS "onChange" is not getting invoked with react native new architecture enabled

未关闭
#995 8 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
ios, javascript, react-native
领域
mobile

调研方向

Start by reading the target-action setup in ios/RNDateTimePicker.m around lines 29–31, then trace how the picker handles changes with React Native 0.79.2’s new architecture enabled. Reproduce the issue using the provided spinner example on iOS 18.x; done means onChange fires when the date or time changes with the new architecture enabled.

由索引模型根据 Issue 内容生成。

描述

Summary

(iOS) On change of date and time, onChange is not getting invoked when using with react native version 0.79.2 where react native new architecture is enabled.

Reproducible sample code

  onDateTimeChange = (_, dateTime) => {
    // Not getting invoked
  };
      <RNDateTimePicker
        display="spinner"
        value={selectedDateTime}
        minimumDate={MIN_DATE}
        maximumDate={MAX_DATE}
        mode={'datetime'}
        onChange={this.onDateTimeChange}
        timeZoneOffsetInMinutes={timezoneOffset}
      />

Steps to reproduce

  1. Integrate this library with RN version 0.79.2
  2. Open the Date time picker and change the date by spinning

Describe what you expected to happen:

  1. onDateTimeChange should be invoked

Environment info

datetimepicker version: 8.4.3
iOS version: 18.x
React Native version: 0.79.2

Problem: After some investigation found that this is because target action has been enabled only when react native new architecture is disabled.

主要语言
JavaScript
星标
2.9k
派生
459
平均合并
4 天 16 小时
30 天内合并 PR
5

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

react-native-datetimepicker/datetimepicker 的其他 Issue

查看 react-native-datetimepicker/datetimepicker 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。