Browse Source

Fixing call into local store to use category name

pull/319/head
Avd6977 8 years ago
committed by GitHub
parent
commit
6b95589bc2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/Squidex/app/shared/components/schema-category.component.ts

6
src/Squidex/app/shared/components/schema-category.component.ts

@ -60,13 +60,13 @@ export class SchemaCategoryComponent implements OnInit, OnChanges {
} }
public ngOnInit() { public ngOnInit() {
this.isOpen = this.localStore.get(`schema-category.${name}`) !== 'false'; this.isOpen = this.localStore.get(`schema-category.${this.name}`) !== 'false';
} }
public toggle() { public toggle() {
this.isOpen = !this.isOpen; this.isOpen = !this.isOpen;
this.localStore.set(`schema-category.${name}`, this.isOpen + ''); this.localStore.set(`schema-category.${this.name}`, this.isOpen + '');
} }
public ngOnChanges(changes: SimpleChanges): void { public ngOnChanges(changes: SimpleChanges): void {
@ -97,4 +97,4 @@ export class SchemaCategoryComponent implements OnInit, OnChanges {
public trackBySchema(index: number, schema: SchemaDto) { public trackBySchema(index: number, schema: SchemaDto) {
return schema.id; return schema.id;
} }
} }

Loading…
Cancel
Save