fixed auto open concernement on first load
This commit is contained in:
@@ -214,7 +214,7 @@ export const ConcernementsStore = defineStore({
|
||||
|
||||
},
|
||||
hideShowConcernement (id, state) {
|
||||
console.log(`disableConcernement id: ${id}`);
|
||||
// console.log(`disableConcernement id: ${id}`);
|
||||
this.concernements.forEach((c, i) => {
|
||||
if (c.id === id) {
|
||||
this.concernements[i].visible = this.concernementsByID[id].visible = state;
|
||||
@@ -226,9 +226,11 @@ export const ConcernementsStore = defineStore({
|
||||
var state;
|
||||
this.concernements.forEach((c, i) => {
|
||||
state = id === c.id;
|
||||
this.concernements[i].opened = this.concernementsByID[c.id].opened = state;
|
||||
// console.log(`openCloseConcernements foreach id: ${id}, c.id: ${c.id}, state: ${state}`, id, c.id);
|
||||
c.opened = this.concernements[i].opened = this.concernementsByID[c.id].opened = state;
|
||||
if (state) {
|
||||
this.opened_concernement = c;
|
||||
// console.log('openCloseConcernements', this.opened_concernement.opened);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user