Skip channel search on empty search
This commit is contained in:
parent
66fd15160e
commit
44df5c755c
|
@ -1,7 +1,7 @@
|
||||||
import { Component, OnDestroy, OnInit } from '@angular/core'
|
import { Component, OnDestroy, OnInit } from '@angular/core'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { AuthService, Notifier } from '@app/core'
|
import { AuthService, Notifier } from '@app/core'
|
||||||
import { forkJoin, Subscription } from 'rxjs'
|
import { forkJoin, of, Subscription } from 'rxjs'
|
||||||
import { SearchService } from '@app/search/search.service'
|
import { SearchService } from '@app/search/search.service'
|
||||||
import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
|
import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
|
||||||
import { I18n } from '@ngx-translate/i18n-polyfill'
|
import { I18n } from '@ngx-translate/i18n-polyfill'
|
||||||
|
@ -184,6 +184,8 @@ export class SearchComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getVideoChannelObs () {
|
private getVideoChannelObs () {
|
||||||
|
if (!this.currentSearch) return of({ data: [], total: 0 })
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
search: this.currentSearch,
|
search: this.currentSearch,
|
||||||
componentPagination: immutableAssign(this.pagination, { itemsPerPage: this.channelsPerPage })
|
componentPagination: immutableAssign(this.pagination, { itemsPerPage: this.channelsPerPage })
|
||||||
|
|
Loading…
Reference in New Issue