From 56d62722360d0bad35eac21e7e11c0a8c5a53ae4 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 15 Nov 2020 18:23:07 +0100 Subject: [PATCH] Performance optimization WIP --- .../tableComponents/cell/cell.component.ts | 2 +- .../isPartOfGraphQLFunction.ts | 4 +- .../pages/tables/bikes/bikes.component.html | 16 ++-- src/app/pages/tables/bikes/bikes.component.ts | 73 ++++++++++++++----- src/app/services/bikes.service.ts | 9 +++ 5 files changed, 73 insertions(+), 31 deletions(-) diff --git a/src/app/components/tableComponents/cell/cell.component.ts b/src/app/components/tableComponents/cell/cell.component.ts index 18aeffd..475b000 100644 --- a/src/app/components/tableComponents/cell/cell.component.ts +++ b/src/app/components/tableComponents/cell/cell.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, Output, EventEmitter } from '@angular/core'; +import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; @Component({ selector: 'app-cell', diff --git a/src/app/helperFunctions/isPartOfGraphQLFunction.ts b/src/app/helperFunctions/isPartOfGraphQLFunction.ts index 04e7390..1399166 100644 --- a/src/app/helperFunctions/isPartOfGraphQLFunction.ts +++ b/src/app/helperFunctions/isPartOfGraphQLFunction.ts @@ -1,14 +1,14 @@ import { DocumentNode } from 'graphql'; export function isPartOfGraphQLDoc( - variableName: String, + variableName: string, doc: DocumentNode ): boolean { return isPartOfSelectionSet(variableName, doc.definitions[0]); } function isPartOfSelectionSet( - variableName: String, + variableName: string, selectionObject: any ): boolean { const variablePath = variableName.split('.'); diff --git a/src/app/pages/tables/bikes/bikes.component.html b/src/app/pages/tables/bikes/bikes.component.html index 0910c09..d9c2787 100644 --- a/src/app/pages/tables/bikes/bikes.component.html +++ b/src/app/pages/tables/bikes/bikes.component.html @@ -17,12 +17,12 @@
@@ -59,10 +59,12 @@ @@ -100,9 +102,7 @@
+ {{ element[column.name] }}