Skip to content

Commit 092acf5

Browse files
committed
Rename navigationTriggerElement to focusRestorationSelector
1 parent 533e61f commit 092acf5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/components/src/navigator/navigator-provider/component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ function NavigatorProvider(
5050
const navigatorContextValue: NavigatorContextType = {
5151
location: locationHistory[ locationHistory.length - 1 ],
5252
push: ( path, options ) => {
53-
const { navigationTriggerElement, ...restOptions } = options;
53+
const { focusRestorationSelector, ...restOptions } = options;
5454

55-
// The `navigationTriggerElement` needs to be applied on the current
55+
// The `focusRestorationSelector` needs to be applied on the current
5656
// location, while the remaining options need to be applied on the
5757
// incoming location
5858
setLocationHistory( [
5959
...locationHistory.slice( 0, -1 ),
6060
// Force the `isBack` flag to `true` when navigating back.
6161
{
6262
...locationHistory[ locationHistory.length - 1 ],
63-
navigationTriggerElement,
63+
focusRestorationSelector,
6464
},
6565
{
6666
path,

packages/components/src/navigator/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
import type { ReactNode } from 'react';
66

77
type NavigateOptions = {
8-
navigationTriggerElement?: unknown;
8+
focusRestorationSelector?: string;
99
};
1010

11-
export type NavigatorLocation = {
11+
export type NavigatorLocation = NavigateOptions & {
1212
isBack?: boolean;
1313
path?: string;
14-
navigationTriggerElement?: unknown;
1514
};
1615

1716
export type NavigatorContext = {

0 commit comments

Comments
 (0)