Commit 38bbcce
authored
[expo-router][ios] fix selected icon assignment when no selected is specified (expo#46096)
# Why
When specifying only the default icon for tab with role search
```tsx
<NativeTabs.Trigger ...... role="search">
<NativeTabs.Trigger.Icon sf="heart" />
</NativeTabs.Trigger>
```
The icon is overridden by system search icon, when tab is selected. This
is a bug in react-native-screens and not desirable behavior.
# How
When only default icon is specified, pass it to `selectedIcon` prop on
screen's `Tab.Screen`
# Test Plan
1. CI
2. Manual router-e2e tests
**Before**
https://github.com/user-attachments/assets/b5b966bb-a68b-4a02-a94f-5aaba83c9cf8
**After**
https://github.com/user-attachments/assets/5eecda69-5f53-408b-b9c5-f1a4e3480c63
# Checklist
<!--
Please check the appropriate items below if they apply to your diff.
-->
- [ ] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)1 parent 6a2fe37 commit 38bbcce
12 files changed
Lines changed: 187 additions & 25 deletions
File tree
- packages/expo-router
- build/native-tabs
- src/native-tabs
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments