Hi Vin,
Greetings from Syncfusion support.
We have validated your query “When opening the dialog, the dialog retains the old value, how to reset the value of the dialog?”.
The value of the dialog can be changed using the `content` property, where the content can be changed dynamically before the dialog open. We have prepared a sample for your reference,
Code Snippet
Here the value selected in the dropdown list is displayed in the dialog dynamically.
|
public currentData: string;
onSelect(args: SelectEventArgs) {
this.currentData = (args.itemData as any).Name;
}
public modalBtnClick = (): void => {
this.content = this.currentData;
this.modalDialog.show();
}; |
Note: The `ngOnInit` will be triggered only once when initialization of the component.
Please check the above code snippet and the sample and let us know if it satisfies your requirement.
Regards,
Revanth