software-mansion / software-mansion/react-native-screens
unstable_headerRightItems: state: 'on' checkmark not displayed for items in the second of two sibling nested submenus
@kmichalikk is already working on this.
Since May 11, 2026.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 714
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 71
Description
Description
When two nested submenus are rendered as siblings inside an inline-grouped menu under unstable_headerRightItems, action items in the first submenu correctly display their state: 'on' checkmark, but action items in the second submenu show no checkmark — even though the JS-side data is structurally identical between the two submenus.
This appears related to the flat-index identifier scheme that issue #3606 and PR #3762 addressed for onPress handler routing. It looks like the same flat-index identity is also used to associate state with each item, so the second submenu's state is silently lost on the native side.
Steps to reproduce
- Create a screen using react-native-screens with
<Stack.Screen options={{ unstable_headerRightItems: () => [...] }} />. - Configure a
type: 'menu'item that contains aninline: truewrapper submenu, which itself contains two sibling submenus ("Sort" and "Group"). Each child submenu has a list oftype: 'action'items, withstate: 'on'set on the matching item:
{
type: 'menu',
label: 'More',
icon: { type: 'sfSymbol', name: 'ellipsis' },
menu: {
items: [
{
type: 'submenu',
label: '',
inline: true,
items: [
{
type: 'submenu',
label: 'Sort',
icon: { type: 'sfSymbol', name: 'arrow.up.arrow.down' },
items: [
{ type: 'action', label: 'Manual', state: 'off', onPress: () => {} },
{ type: 'action', label: 'Due date', state: 'on', onPress: () => {} },
{ type: 'action', label: 'Priority', state: 'off', onPress: () => {} },
],
},
{
type: 'submenu',
label: 'Group',
icon: { type: 'sfSymbol', name: 'square.3.layers.3d' },
items: [
{ type: 'action', label: 'None', state: 'on', onPress: () => {} },
{ type: 'action', label: 'Goal', state: 'off', onPress: () => {} },
{ type: 'action', label: 'Life area', state: 'off', onPress: () => {} },
],
},
],
},
],
},
}
- Open the "More" menu on the header → tap "Sort" → checkmark is shown next to "Due date" ✅
Back to "More" menu → tap "Group" → no item has a checkmark ❌, even though "None" hasstate: 'on'.
when switching between the 2, the checkmark seems to move from 1 to the other in the reproduction. In my case, both always have a state with a checkmark.
Snack or a link to a repository
Screens version
4.24.0
React Native version
0.83.2
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Expo managed workflow
Architecture
Fabric (New Architecture)
Build type
Release mode
Device
Real device
Device model
iPhone 15 pro
Acknowledgements
Yes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.