RNTester: example list search filter resets after returning from an example
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đá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
- 69/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, react-native
- Lĩnh vực
- mobile
Hướng nghiên cứu
Start with RNTesterExampleFilter, RNTesterAppShared, and RNTesterModuleList under packages/rn-tester; trace how filter and category state is lost when the list unmounts. Keep that state available when returning from an example, then reproduce the Components list steps and confirm the search text and selected category persist.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
In RNTester, the search text in the Components and APIs lists resets when you open an example and go back. You must enter the filter again each time.
The cause is in RNTester itself: RNTesterExampleFilter keeps filter and category in its own component state, and RNTesterAppShared renders RNTesterModuleList, which contains the filter, only when no example is open. Opening an example unmounts the filter and drops its state. A possible fix is to keep the filter state in RNTesterAppShared or in the navigation reducer, next to the recentlyUsed state that already lives there.
Steps to reproduce
- Open RNTester and go to the Components list.
- Type
Flatin the "Search..." field and press Return. The list shows only FlatList. - Open FlatList.
- Tap Back.
Expected: The list shows with the search text Flat, as before.
Actual: The search field is empty ("Search...") and the full list shows, with FlatList under "Recently Viewed".
TV builds (react-native-tvos) also show category pills above the list, and the selected category resets in the same way.
React Native Version
main at f480836ad8e (packages/react-native version 1000.0.0)
Affected Platforms
Runtime - iOS
Tested on an iPhone 18 Pro simulator, iOS 27.0, RNTester debug build. Also seen on the Apple TV 4K (3rd generation) simulator, tvOS 27.0, with the react-native-tvos RNTester, which uses the same code. Not tested on Android.
Output of npx @react-native-community/cli info
System:
OS: macOS 26.7.1
CPU: (18) arm64 Apple M5 Pro
Memory: 1.60 GB / 48.00 GB
Shell:
version: 5.3.20
path: /opt/homebrew/bin/bash
Binaries:
Node:
version: 24.13.0
path: /usr/local/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 11.4.2
path: /opt/homebrew/bin/npm
Watchman:
version: 2026.07.27.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.17.0
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 27.2
- iOS 27.2
- macOS 27.2
- tvOS 27.2
- visionOS 27.2
- watchOS 27.2
Android SDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.26094.121.2512.13840223
Xcode:
version: 27.2/27B52
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.20.1
path: /usr/bin/javac
Ruby:
version: 4.0.7
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: false
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
None. No error or warning is logged; the filter state is lost when the list unmounts.
MANDATORY Reproducer
The reproducer is RNTester in this repository (packages/rn-tester), with the steps above.
Screenshots and Videos
No response
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.5k
- Merge trung bình
- 3 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 188
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/react-native
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
react/react-native#59945 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
react/react-native#59944 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
react/react-native#59942 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
react/react-native#59939 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
react/react-native#59929 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của react/react-native
Issue tương tự
-
test(tools): two testkit cache tests fail unless GOCACHE and GOMODCACHE are in the environmentĐang mởbacklog
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EchoTools/nevr-runtime#2385 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
tensorflow/tflite-micro#3995 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CPU update 1.31xĐang mởspeed-report
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
mw00/project-maya#961 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
not for AI lovers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
OSGeo/gdal#15515 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày