MOBILE-4188 core: Show sticky participants search
parent
8bb6b45159
commit
0c45d9a654
|
@ -1,17 +1,11 @@
|
||||||
<core-navbar-buttons slot="end">
|
|
||||||
<ion-button [hidden]="!searchEnabled" (click)="toggleSearch()" [attr.aria-label]="'core.search' | translate">
|
|
||||||
<ion-icon name="fas-magnifying-glass" slot="icon-only" aria-hidden="true"></ion-icon>
|
|
||||||
</ion-button>
|
|
||||||
</core-navbar-buttons>
|
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<core-split-view>
|
<core-split-view>
|
||||||
<ion-refresher slot="fixed" [disabled]="!participants.loaded || searchInProgress" (ionRefresh)="refreshParticipants($event.target)">
|
<ion-refresher slot="fixed" [disabled]="!participants.loaded || searchInProgress" (ionRefresh)="refreshParticipants($event.target)">
|
||||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
|
|
||||||
<core-search-box *ngIf="showSearchBox" [disabled]="searchInProgress" [spellcheck]="false" [autoFocus]="true" [lengthCheck]="1"
|
<core-search-box [disabled]="searchInProgress" [spellcheck]="false" [autoFocus]="true" [lengthCheck]="1" autocorrect="off"
|
||||||
autocorrect="off" searchArea="CoreUserParticipants" (onSubmit)="search($event)" (onClear)="clearSearch()">
|
searchArea="CoreUserParticipants" (onSubmit)="search($event)" (onClear)="clearSearch()">
|
||||||
</core-search-box>
|
</core-search-box>
|
||||||
|
|
||||||
<core-loading [hideUntil]="participants.loaded">
|
<core-loading [hideUntil]="participants.loaded">
|
||||||
|
|
|
@ -31,6 +31,7 @@ import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-core-user-participants',
|
selector: 'page-core-user-participants',
|
||||||
templateUrl: 'participants.html',
|
templateUrl: 'participants.html',
|
||||||
|
styleUrls: ['participants.scss'],
|
||||||
})
|
})
|
||||||
export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestroy {
|
export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
|
@ -39,7 +40,6 @@ export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestro
|
||||||
searchQuery: string | null = null;
|
searchQuery: string | null = null;
|
||||||
searchInProgress = false;
|
searchInProgress = false;
|
||||||
searchEnabled = false;
|
searchEnabled = false;
|
||||||
showSearchBox = false;
|
|
||||||
fetchMoreParticipantsFailed = false;
|
fetchMoreParticipantsFailed = false;
|
||||||
|
|
||||||
@ViewChild(CoreSplitViewComponent) splitView!: CoreSplitViewComponent;
|
@ViewChild(CoreSplitViewComponent) splitView!: CoreSplitViewComponent;
|
||||||
|
@ -84,20 +84,6 @@ export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestro
|
||||||
this.participants.destroy();
|
this.participants.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show or hide search box.
|
|
||||||
*/
|
|
||||||
toggleSearch(): void {
|
|
||||||
this.showSearchBox = !this.showSearchBox;
|
|
||||||
|
|
||||||
if (this.showSearchBox) {
|
|
||||||
// Make search bar visible.
|
|
||||||
this.splitView.menuContent.scrollToTop();
|
|
||||||
} else {
|
|
||||||
this.clearSearch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear search.
|
* Clear search.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
:host {
|
||||||
|
|
||||||
|
core-split-view {
|
||||||
|
isolation: isolate;
|
||||||
|
}
|
||||||
|
|
||||||
|
core-search-box {
|
||||||
|
position: sticky;
|
||||||
|
top: 8px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue