From 0e975569e5686138e52bdc554b3f0391f42aeead Mon Sep 17 00:00:00 2001
From: IEatChili <nanunguyen99@gmail.com>
Date: Thu, 15 Aug 2024 14:13:02 -0400
Subject: feat: added face recogntion box

---
 src/client/views/KeywordBox.tsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/client/views/KeywordBox.tsx')

diff --git a/src/client/views/KeywordBox.tsx b/src/client/views/KeywordBox.tsx
index 68584a7fa..fc9c38a11 100644
--- a/src/client/views/KeywordBox.tsx
+++ b/src/client/views/KeywordBox.tsx
@@ -7,7 +7,7 @@ import { Doc, DocListCast } from '../../fields/Doc';
 import { DocData } from '../../fields/DocSymbols';
 import { List } from '../../fields/List';
 import { NumCast, StrCast } from '../../fields/Types';
-import { emptyFunction } from '../../Utils';
+import { emptyFunction, Utils } from '../../Utils';
 import { DocumentType } from '../documents/DocumentTypes';
 import { DragManager } from '../util/DragManager';
 import { SnappingManager } from '../util/SnappingManager';
@@ -124,7 +124,7 @@ export class KeywordItem extends ObservableReactComponent<KeywordItemProps> {
 
     render() {
         return (
-            <div className="keyword" onClick={this._props.setToEditing} onPointerDown={this.handleDragStart} ref={this.ref}>
+            <div className="keyword" onClick={this._props.setToEditing} onPointerDown={this.handleDragStart} ref={this.ref} key={Utils.GenerateGuid()}>
                 {this._props.keyword}
                 {this.props.isEditing && <IconButton tooltip={'Remove label'} onPointerDown={this.removeLabel} icon={'X'} style={{ width: '8px', height: '8px', marginLeft: '10px' }} />}
             </div>
@@ -297,7 +297,7 @@ export class KeywordBox extends ObservableReactComponent<KeywordBoxProps> {
                 <div className="keywords-content">
                     <div className="keywords-list">
                         {(keywordsList as List<string>).map(keyword => {
-                            return <KeywordItem doc={this._props.doc} keyword={keyword} keywordDoc={this.getKeywordCollection(keyword)} setToEditing={this.setToEditing} isEditing={this._props.isEditing}></KeywordItem>;
+                            return <KeywordItem key={Utils.GenerateGuid()} doc={this._props.doc} keyword={keyword} keywordDoc={this.getKeywordCollection(keyword)} setToEditing={this.setToEditing} isEditing={this._props.isEditing}></KeywordItem>;
                         })}
                     </div>
                     {this._props.isEditing ? (
@@ -331,6 +331,7 @@ export class KeywordBox extends ObservableReactComponent<KeywordBoxProps> {
                                                 onClick={() => {
                                                     this.submitLabel(keyword);
                                                 }}
+                                                key={Utils.GenerateGuid()}
                                             />
                                         );
                                     })}
-- 
cgit v1.2.3-70-g09d2

