From da10c63823f7bc5e90c3f397c9ff06431d2ee027 Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Tue, 2 Jul 2024 00:55:45 -0400
Subject: eq highlight cycling inconsistency fixed

---
 .../views/collections/collectionSchema/CollectionSchemaView.tsx   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')

diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index b81cfa821..a6a5df4b9 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -614,6 +614,7 @@ export class CollectionSchemaView extends CollectionSubView() {
         return [selectedAbove, selectedBelow];
     }
 
+    @action
     removeCellHighlights = () => {
         this._highlightedCellsInfo.forEach(info => {
             const doc = info[0];
@@ -655,10 +656,11 @@ export class CollectionSchemaView extends CollectionSubView() {
             const doc = info[0]; 
             const field = info[1];
             const key = `${doc[Id]}_${field}`;
+            console.log(key + ' ' + i % 10 + ' color: ' + color[0].r + color[0].g + color[0].b);
             const cell = this.getCellElement(doc, field);
-            if (!this._cellHighlightColors.has(key)) {this._cellHighlightColors.set(key, [colorStrings[0], colorStrings[1]])}
-            cell.style.border = this._cellHighlightColors.get(key)[0];
-            cell.style.backgroundColor = this._cellHighlightColors.get(key)[1];
+            this._cellHighlightColors.set(key, [colorStrings[0], colorStrings[1]]);
+            cell.style.border = colorStrings[0];
+            cell.style.backgroundColor = colorStrings[1];
         }
     }
 
-- 
cgit v1.2.3-70-g09d2

