Skip to content
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

NbDialogService has problem with inputSignal and ModelSignal #3256

Open
1 of 2 tasks
Akxe opened this issue May 29, 2024 · 0 comments
Open
1 of 2 tasks

NbDialogService has problem with inputSignal and ModelSignal #3256

Akxe opened this issue May 29, 2024 · 0 comments

Comments

@Akxe
Copy link

Akxe commented May 29, 2024

Issue type

I'm submitting a ...

  • bug report
  • feature request

Issue description

Current behavior:

this.dialogService.open(OrderDetailComponent, {
	closeOnBackdropClick: false,
	context: {
		// Error: TS2322: Type 'Order' is not assignable to type 'InputSignal<Order> | undefined'
		data: data,
	},
});

Expected behavior:
The input model should be updated, not tried to be replaced by new value

Steps to reproduce:

  1. Create a component with inputSignal (input.required());
  2. Open the component with context specifying our inputSignal

Related code:

@Component(...)
class MyDialogComponent {
  data = input.required<string>();
}

@Component(...)
class MyParentComponent {
  private readonly dialogService = inject(NbDialogService);


  onCreate(): void {
    this.dialogService.open(MyDialogComponent , {
      context: {
        data: 'test',
      },
    });
  }
}

Other information:

npm, node, OS, Browser

Node: v20.12.2
System: Win11

Angular, Nebular

Angular: 17
Nebular: 13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant