8000 fix(core): Frame ignored event listeners in xml markup by CatchABus · Pull Request #10646 · NativeScript/NativeScript · GitHub
[go: up one dir, main page]

Skip to content

fix(core): Frame ignored event listeners in xml markup #10646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/core/ui/frame/frame-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ function buildEntryFromArgs(arg: any): NavigationEntry {

@CSSType('Frame')
export class FrameBase extends CustomLayoutView {
public static androidOptionSelectedEvent = 'optionSelected';
public static navigatingToEvent = 'navigatingTo';
public static navigatedToEvent = 'navigatedTo';

private _animated: boolean;
private _transition: NavigationTransition;
Expand Down Expand Up @@ -267,7 +268,7 @@ export class FrameBase extends CustomLayoutView {

newPage.onNavigatedTo(isBack);
this.notify({
eventName: Page.navigatedToEvent,
eventName: FrameBase.navigatedToEvent,
object: this,
isBack,
entry,
Expand Down Expand Up @@ -452,7 +453,7 @@ export class FrameBase extends CustomLayoutView {

backstackEntry.resolvedPage.onNavigatingTo(backstackEntry.entry.context, isBack, backstackEntry.entry.bindingContext);
this.notify({
eventName: Page.navigatingToEvent,
eventName: FrameBase.navigatingToEvent,
object: this,
isBack,
entry: backstackEntry,
Expand Down
10 changes: 10 additions & 0 deletions packages/core/ui/frame/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ export interface NavigationData extends EventData {
* Nested frames are supported, enabling hierarchical navigation scenarios.
*/
export class Frame extends FrameBase {
/**
* String value used when hooking to navigatingTo event.
*/
public static readonly navigatingToEvent = 'navigatingTo';

/**
* String value used when hooking to navigatedTo event.
*/
public static readonly navigatedToEvent = 'navigatedTo';

/**
* @private
*/
Expand Down
Loading
0