Front: temporary disable search
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<div class="list-container mat-elevation-z8" (scroll)="onScroll($event)" style="overflow-y: scroll;">
|
<div class="list-container mat-elevation-z8" (scroll)="onScroll($event)" style="overflow-y: scroll;">
|
||||||
|
<!--
|
||||||
<div class="list-header">
|
<div class="list-header">
|
||||||
<mat-grid-list cols="10" rowHeight="60">
|
<mat-grid-list cols="10" rowHeight="60">
|
||||||
<mat-grid-tile>
|
<mat-grid-tile>
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
</mat-grid-tile>
|
</mat-grid-tile>
|
||||||
</mat-grid-list>
|
</mat-grid-list>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<mat-table #table [dataSource]="dataSource" [trackBy]="trackByUid" matSort class="animate">
|
<mat-table #table [dataSource]="dataSource" [trackBy]="trackByUid" matSort class="animate">
|
||||||
|
|
||||||
<ng-container matColumnDef="number">
|
<ng-container matColumnDef="number">
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ import { MatButtonModule } from '@angular/material/button';
|
|||||||
import { MatGridListModule } from '@angular/material/grid-list';
|
import { MatGridListModule } from '@angular/material/grid-list';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatSelectModule } from '@angular/material/select';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { MatChipInputEvent, MatChipsModule} from '@angular/material/chips';
|
import { MatChipsModule} from '@angular/material/chips';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import {COMMA, ENTER, TAB} from '@angular/cdk/keycodes';
|
|
||||||
import { NgFor } from '@angular/common';
|
import { NgFor } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -30,12 +29,12 @@ export class LayersListComponent implements OnInit {
|
|||||||
|
|
||||||
@ViewChild(MatSort) sort!: MatSort;
|
@ViewChild(MatSort) sort!: MatSort;
|
||||||
|
|
||||||
start: number = 0;
|
start = 0;
|
||||||
limit: number = 50;
|
limit = 50;
|
||||||
end: number = this.limit + this.start;
|
end: number = this.limit + this.start;
|
||||||
loadingInProgress: boolean = false;
|
loadingInProgress = false;
|
||||||
|
|
||||||
type: string = "";
|
type = "";
|
||||||
codes: string[] = [];
|
codes: string[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -43,10 +42,11 @@ export class LayersListComponent implements OnInit {
|
|||||||
) { }
|
) { }
|
||||||
|
|
||||||
@HostListener('document:scroll', ['$event'])
|
@HostListener('document:scroll', ['$event'])
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
public async onScroll(event: any) {
|
public async onScroll(event: any) {
|
||||||
if (event.target.offsetHeight + event.target.scrollTop >= event.target.scrollHeight - 1 && !this.loadingInProgress) {
|
if (event.target.offsetHeight + event.target.scrollTop >= event.target.scrollHeight - 1 && !this.loadingInProgress) {
|
||||||
this.loadingInProgress = true;
|
this.loadingInProgress = true;
|
||||||
let data: Layer[] = await Layer.getList(this._http, this.start, this.limit, this.codes);
|
const data: Layer[] = await Layer.getList(this._http, this.start, this.limit, this.codes);
|
||||||
this.dataSource.data = this.dataSource.data.concat(data);
|
this.dataSource.data = this.dataSource.data.concat(data);
|
||||||
this.start = this.end;
|
this.start = this.end;
|
||||||
this.end = this.limit + this.start;
|
this.end = this.limit + this.start;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ export const environment = {
|
|||||||
appEnvironment: "local",
|
appEnvironment: "local",
|
||||||
production: false,
|
production: false,
|
||||||
api: {
|
api: {
|
||||||
url: "http://localhost:5400/api"
|
//url: "http://localhost:5400/api"
|
||||||
//url: "https://diunabi.bim-it.pl/api"
|
url: "https://diunabi-morska.bim-it.pl/api"
|
||||||
},
|
},
|
||||||
google: {
|
google: {
|
||||||
clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com"
|
clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com"
|
||||||
|
|||||||
Reference in New Issue
Block a user