mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add search in header
This commit is contained in:
@@ -12,6 +12,8 @@ import { ProfileComponent } from '../headers/header-no-search/profile/profile.co
|
||||
export class HeaderPage implements OnInit {
|
||||
|
||||
profile: string = 'mdgpr';
|
||||
searchSubject: string = '';
|
||||
showSearch:false;
|
||||
|
||||
constructor(
|
||||
private router: Router,private modalController: ModalController,
|
||||
@@ -33,7 +35,7 @@ export class HeaderPage implements OnInit {
|
||||
async openSearch() {
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'group-messages modal-desktop',
|
||||
cssClass: 'group-messages modal-desktop search-modal search-modal-to-desktop',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
@@ -45,7 +47,6 @@ export class HeaderPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
async openProfile() {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
@@ -83,5 +84,26 @@ export class HeaderPage implements OnInit {
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
async dynamicSearch(){
|
||||
console.log('dynamic')
|
||||
window['dynamicSearch'](this.searchSubject)
|
||||
}
|
||||
|
||||
|
||||
async closeSearch(){
|
||||
document.querySelectorAll('.search-modal').forEach((e)=>e.remove())
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description set empty value to searchSubject
|
||||
*/
|
||||
clearSearchInput(){
|
||||
this.searchSubject = "";
|
||||
window['dynamicSearch'](this.searchSubject)
|
||||
}
|
||||
|
||||
async basicSearch(){
|
||||
window['searchTriger']()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user