diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-06-21 02:17:46 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-06-21 02:17:46 -0400 |
commit | 8414744f15b58f55cee14dbabb5c0e6a4a62a4c6 (patch) | |
tree | 3d52ede50a9087710a516e7403524ed5a2ac0a0a /src | |
parent | 22152c38c3e1485c107b321f1ce3894e87c0226f (diff) |
cell highlights consistsent on row moving
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 992ee2ec9..6838662c7 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -585,10 +585,13 @@ export class CollectionSchemaView extends CollectionSubView() { this._highlightedCells = [...cellsToHighlight]; this._highlightedCells.forEach(info => { const color = randomRGBColor(); - const cell = this.getCellElement(info[0], info[1]); - if (!this._cellHighlightColors.has(cell)) {this._cellHighlightColors.set(cell, new Array<string>(`solid 2px ${color[0]}`, color[1]))} - cell.style.border = this._cellHighlightColors.get(cell)[0]; - cell.style.backgroundColor = this._cellHighlightColors.get(cell)[1]; + const doc = info[0]; + const field = info[1]; + const key = `${doc}_${field}`; + const cell = this.getCellElement(doc, field); + if (!this._cellHighlightColors.has(key)) {this._cellHighlightColors.set(key, new Array<string>(`solid 2px ${color[0]}`, color[1]))} + cell.style.border = this._cellHighlightColors.get(key)[0]; + cell.style.backgroundColor = this._cellHighlightColors.get(key)[1]; }); } |