From a4199d30b81c464fd7ff15eee1fc56f432ee53a3 Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Mon, 1 Jul 2024 14:52:35 -0400
Subject: fonticonbox no longer added when dragged from tools menu

---
 .../views/collections/collectionSchema/CollectionSchemaView.tsx       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(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 d0b531ad6..7a90b3505 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -44,6 +44,7 @@ import { TbHemispherePlus } from 'react-icons/tb';
 import { docs_v1 } from 'googleapis';
 import { SchemaCellField } from './SchemaCellField';
 import { threadId } from 'worker_threads';
+import { FontIconBox } from '../../nodes/FontIconBox/FontIconBox';
 
 const { SCHEMA_NEW_NODE_HEIGHT } = require('../../global/globalCssVariables.module.scss'); // prettier-ignore
 
@@ -740,6 +741,7 @@ export class CollectionSchemaView extends CollectionSubView() {
 
     @action
     onInternalDrop = (e: Event, de: DragManager.DropEvent) => {
+        console.log('called')
         if (de.complete.columnDragData) {
             setTimeout(() => {this.setColDrag(false);});
             e.stopPropagation();
@@ -1301,7 +1303,7 @@ export class CollectionSchemaView extends CollectionSubView() {
             const desc = BoolCast(this.layoutDoc.sortDesc); // is this an ascending or descending sort
             docs = this.sortDocs(field, desc, true);
         } else {
-            const draggedDocs = this.isContentActive() ? DragManager.docsBeingDragged : [];
+            const draggedDocs = this.isContentActive() ? DragManager.docsBeingDragged.filter(doc => !(doc.type === 'fonticonbox')) : [];
             docs = docs.filter(d => !draggedDocs.includes(d));
             docs.splice(this.rowDropIndex, 0, ...draggedDocs);
         }
-- 
cgit v1.2.3-70-g09d2

