|
|
@ -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 { |
|
|
@ -75,6 +75,12 @@ export class SchemaCategoryComponent implements OnInit, OnChanges { |
|
|
|
|
|
|
|
|
this.schemasForCategory = this.schemas.filter(x => this.isSameCategory(x)); |
|
|
this.schemasForCategory = this.schemas.filter(x => this.isSameCategory(x)); |
|
|
this.schemasFiltered = this.schemasForCategory.filter(x => !query || x.name.indexOf(query) >= 0); |
|
|
this.schemasFiltered = this.schemasForCategory.filter(x => !query || x.name.indexOf(query) >= 0); |
|
|
|
|
|
|
|
|
|
|
|
if (query) { |
|
|
|
|
|
this.isOpen = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.isOpen = this.localStore.get(`schema-category.${this.name}`) !== 'false'; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (changes['name']) { |
|
|
if (changes['name']) { |
|
|
@ -97,4 +103,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; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|