Skip to content
Snippets Groups Projects
Commit 07807ce5 authored by Jérémie BRISON's avatar Jérémie BRISON
Browse files

Merge branch 'topic-search' of...

parents f868677f 332a401a
No related branches found
No related tags found
2 merge requests!31Recette,!12Topic search
......@@ -26,7 +26,8 @@ export class SearchComponent implements OnInit {
public searchForm: FormGroup;
// Modal variable
public categories: Category[];
public modalTypeOpened: string;
public modalTypeOpened: string; // todo: utiliser enum
public isOpenModal = false;
// Checkbox variable
public checkedModulesFilter: Module[];
......@@ -113,8 +114,13 @@ export class SearchComponent implements OnInit {
public openModal(option: string): void {
this.categories = [];
if (this.modalTypeOpened !== option) {
this.modalTypeOpened = option;
this.fakeData(option);
if (!this.isOpenModal) {
this.modalTypeOpened = option;
this.fakeData(option);
this.isOpenModal = true;
} else {
this.isOpenModal = false;
}
} else {
this.modalTypeOpened = null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment