Browse Source

Open categories when searching

Open categories when searching so the user can see the results, but then return to the state when query is cleared.
pull/319/head
Avd6977 7 years ago
committed by GitHub
parent
commit
89def2b319
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

@ -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']) {

Loading…
Cancel
Save