IOS and ANDROID onChange Event do not share the same value but have the same type
Chưa có ai nhận issue này.
- #1064 của @cpruijsen — đã đóng, không merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react-native, typescript
Hướng nghiên cứu
The report identifies the DateTimePicker onChange callback type and a mismatch between iOS and Android values, but names no source files or tests. Start by tracing the callback type definitions and platform implementations, then look for existing callback tests. Done when the type reflects the value returned on iOS and the mismatch is covered by a test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug report
Summary
DatePicker onChange value is not the same between IOS and ANDROID but both actually share the same type, leading to TS invalid type when trying to accessing "unexisting" property
Reproducible sample code
<DateTimePicker
value={birthdate}
is24Hour={true}
onChange={(
value: DateTimePickerEvent & {
nativeEvent: { target?: number };
}) => {
if (value.nativeEvent.target) {
// operation on date change
}}
/>
Steps to reproduce
Set a DatePicker component anywhere with anydata and run it on IOS, this was tested with mode "compact"
Describe what you expected to happen:
IOS onChange type should be following the actual data returned
Environment info
EXPO SDK 51.0
System:
OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
Memory: 1.64 GB / 4.81 GB
Shell:
version: 5.8.1
path: /bin/zsh
Binaries:
Node:
version: 20.5.1
path: /usr/bin/node
Yarn:
version: 1.22.22
path: /usr/bin/yarn
npm:
version: 10.8.2
path: /usr/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.5
wanted: 0.74.5
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
datetimepicker version: 2.7.5
- Ngôn ngữ chính
- JavaScript
- Star
- 2.9k
- Fork
- 459
- Merge trung bình
- 4 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react-native-datetimepicker/datetimepicker
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 bình luận ·
Tất cả issue của react-native-datetimepicker/datetimepicker
Issue tương tự
-
cdx-audit output written to a pipe is cut off at 64 KiBCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug mode:cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Fei2411/DeepSeek-Bot#963 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Miaotofu01/Study-Mate#244 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test-reliability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure/azure-sdk-for-js#40672 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày