I am having data related to cars coming from an API call which I am displaying in angular ag-grid. I have some default and some customized options which user can select of his own choice. I also need to provide user an option to select the customized option. I am giving user an edit option inside the ag-grid if he clicks on edit one mat-dialog will open up with all customized options with checkbox user can select the option by clicking on the checkbox. if user next time try to edit the customized option the previously selected option checkbox should be checked so that user can know what options he has already selected.
I am facing issue in showing the already selected option as checked, Could anyone please tell me how can I achieve this. I have replicated the same scenario under this link
https://stackblitz.com/edit/ag-grid-with-edit-funcion?file=src%2Fapp%2Fapp.component.ts
I am using below data to display in ag-grid row if a user selects edit of first row the engine and seat-covers checkbox should be automatically selected .
{
no: 1,
make: "Toyota",
model: "Celica",
price: 35000,
fields: ["engine", "seat-covers"]
},
{
no: 2,
make: "Ford",
model: "Mondeo",
price: 32000,
fields: ["engine", "body-material", "seat-covers"]
},
{
no: 3,
make: "Porsche",
model: "Boxter",
price: 72000,
fields: ["engine", "body-material", "seat-covers"]
}