File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,11 +234,13 @@ function WorkspaceStackView(props: ViewProps) {
234234 if ( ! primaryRoute ) return < V5StackView { ...props } /> ;
235235 const primaryDescriptor = props . descriptors [ primaryRoute . key ] ! ;
236236 const baseRoute = { key : `${ props . state . key } :workspace` , name : "Workspace" } ;
237+ const visibleRoute = projection . detail . at ( - 1 ) ?? primaryRoute ;
237238 const baseDescriptor : Descriptor = {
238239 ...primaryDescriptor ,
240+ navigation : props . descriptors [ visibleRoute . key ] ! . navigation ,
239241 // The native envelope keeps a stable key, but its NavigationProvider must
240242 // identify the real visible route or useIsFocused closes media viewers.
241- route : projection . detail . at ( - 1 ) ?? primaryRoute ,
243+ route : visibleRoute ,
242244 options : { headerShown : false } ,
243245 render : ( ) => < WorkspaceColumns { ...props } primary = { primaryRoute } detail = { projection . detail } /> ,
244246 } ;
@@ -256,11 +258,13 @@ function WorkspaceStackView(props: ViewProps) {
256258 overlays . map ( ( group ) => {
257259 const route = group [ 0 ] ! ;
258260 const descriptor = props . descriptors [ route . key ] ! ;
261+ const visibleRoute = group . at ( - 1 ) ! ;
259262 return [
260263 route . key ,
261264 {
262265 ...descriptor ,
263- route : group . at ( - 1 ) ! ,
266+ navigation : props . descriptors [ visibleRoute . key ] ! . navigation ,
267+ route : visibleRoute ,
264268 options : modalEnvelopeOptions ( descriptor . options ) ,
265269 render : ( ) => (
266270 < V5CardStackView
Original file line number Diff line number Diff line change @@ -207,12 +207,14 @@ export function V5StackView(props: V5StackViewProps) {
207207 groups . map ( ( group ) => {
208208 const first = group [ 0 ] ! ;
209209 const descriptor = props . descriptors [ first . key ] ! ;
210+ const visibleRoute = group . at ( - 1 ) ! ;
210211 return [
211212 first . key ,
212213 {
213214 ...descriptor ,
215+ navigation : props . descriptors [ visibleRoute . key ] ! . navigation ,
214216 // Focus belongs to the pushed page inside this presentation group.
215- route : group . at ( - 1 ) ! ,
217+ route : visibleRoute ,
216218 options : modalEnvelopeOptions ( descriptor . options ) ,
217219 render : ( ) => (
218220 < V5CardStackView
You can’t perform that action at this time.
0 commit comments