Repository navigation
Fix RNTester losing list search filter when navigating back (#59868) - #60504
Open
JagguDada01 wants to merge 1 commit into
Open
JagguDada01 wants to merge 1 commit into
JagguDada01 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #59868.
In RNTester, opening an example from the Components or APIs list unmounted
RNTesterModuleList, causingRNTesterExampleFilterandRNTesterListFiltersto lose their localfilterandcategorystate when navigating back.This change:
componentsandapis) inRNTesterNavigationReduceralongsiderecentlyUsed.filterText/onFilterTextChangeandcategory/onCategoryChangeprops toRNTesterExampleFilterandcurrentFiltertoRNTesterListFilters, preserving uncontrolled fallback behavior.RNTesterAppSharedthroughRNTesterModuleListso search text and selected category are preserved when opening an example, switching tabs, or navigating back.filterTextinRNTesterModuleContainerwhen navigating into and back from individual sub-examples (showIndividualExamples).RNTesterAppShared,RNTesterExampleFilter, andRNTesterNavigationReducer.Changelog
[INTERNAL] [FIXED] - Preserve RNTester list search and category filters when navigating back from an example.
Test Plan
yarn test packages/rn-tester/:RNTesterAppShared-test.js,RNTesterExampleFilter-test.js,RNTesterNavigationReducer-test.js,SafeAreaInsetsExample-test.js,IntersectionObserverScrollMarginPrefetch-test.js).RNTesterListandRNTesterDocumentationURLto isolate navigation and filter state in Jest.yarn eslint packages/rn-tester/ --max-warnings 0: passed (0 errors, 0 warnings).yarn flow-check:Found 0 errors.yarn prettier --checkon all 11 modified/added files: passed.