aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-07-01 14:52:35 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-07-01 14:52:35 -0400
commita4199d30b81c464fd7ff15eee1fc56f432ee53a3 (patch)
tree5e5268b81cc12f9d0878f138b3c7bd7736872c35
parentc9e3b7679247b615b1821d913b2648a0c1560c5a (diff)
fonticonbox no longer added when dragged from tools menu
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx4
-rw-r--r--src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx2
2 files changed, 4 insertions, 2 deletions
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);
}
diff --git a/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx b/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx
index 22237f448..4f5b3005d 100644
--- a/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaColumnHeader.tsx
@@ -71,7 +71,7 @@ export class SchemaColumnHeader extends ObservableReactComponent<SchemaColumnHea
setColumnValues = (field: string, defaultValue: string) => {this._props.schemaView?.setKey(field, defaultValue, this._props.columnIndex);}
@action updateAlt = (newAlt: string) => {this._altTitle = newAlt};
updateKeyDropdown = (value: string) => {this._props.schemaView.updateKeySearch(value)};
- openKeyDropdown = () => {console.log('caled'); console.log(this._props.schemaView._colBeingDragged); !this._props.schemaView._colBeingDragged && this._props.schemaView.openColumnMenu(this._props.columnIndex, false)};
+ openKeyDropdown = () => {!this._props.schemaView._colBeingDragged && this._props.schemaView.openColumnMenu(this._props.columnIndex, false)};
toggleEditing = (editing: boolean) => {
this._inputRef?.setIsEditing(editing);
this._inputRef?.setIsFocused(editing);