I need to close my expansion panel automatically when I click on the Update button.
https://i.sstatic.net/pYEYo.png
Is there a way to achieve this programmatically?
This is the content of my update() function:
update(index) {
console.log("index", index);
let vehicle = {};
vehicle.VIN = this.savedVehicles[index].VIN;
vehicle.ModelYear = this.savedVehicles[index].ModelYear;
vehicle.Make = this.savedVehicles[index].Make;
vehicle.Model = this.savedVehicles[index].Model;
this.savedVehicles[index] = vehicle;
localStorage.setItem("savedVehicles", JSON.stringify(this.savedVehicles));
this.alert = true;
this.alertColor = "green";
this.alertMessage = `${vehicle.VIN} updated`;
// hopefully collapse all expansion panels 👈🏽👈🏽👈🏽
},