Browse Source

UI: Fixed when deleting a value in the search field time shows null value

pull/7873/head
Vladyslav_Prykhodko 4 years ago
parent
commit
d99772d74f
  1. 4
      ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts

4
ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts

@ -59,7 +59,7 @@ import { AddEntityDialogData, EntityAction } from '@home/models/entity/entity-co
import { calculateIntervalStartEndTime, HistoryWindowType, Timewindow } from '@shared/models/time/time.models'; import { calculateIntervalStartEndTime, HistoryWindowType, Timewindow } from '@shared/models/time/time.models';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component'; import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
import { isDefined, isEmptyStr, isEqual, isUndefined } from '@core/utils'; import { isDefined, isEmptyStr, isEqual, isString, isUndefined } from '@core/utils';
import { HasUUID } from '@shared/models/id/has-uuid'; import { HasUUID } from '@shared/models/id/has-uuid';
import { ResizeObserver } from '@juggle/resize-observer'; import { ResizeObserver } from '@juggle/resize-observer';
import { hidePageSizePixelValue } from '@shared/models/constants'; import { hidePageSizePixelValue } from '@shared/models/constants';
@ -282,7 +282,7 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa
distinctUntilChanged(), distinctUntilChanged(),
tap(() => { tap(() => {
const queryParams: PageQueryParam = { const queryParams: PageQueryParam = {
textSearch: encodeURI(this.pageLink.textSearch) || null textSearch: isString(this.pageLink.textSearch) && this.pageLink.textSearch !== '' ? encodeURI(this.pageLink.textSearch) : null
}; };
if (this.displayPagination) { if (this.displayPagination) {
this.paginator.pageIndex = 0; this.paginator.pageIndex = 0;

Loading…
Cancel
Save