nebular
nebular copied to clipboard
`NbDialogService` has problem with `inputSignal` and `ModelSignal`
Issue type
I'm submitting a ...
- [x] 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:
- Create a component with
inputSignal(input.required()); - Open the component with
contextspecifying ourinputSignal
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
Can the PR be reviewed and merged, would be nice if we could use the new Signal input for dialogs!