diff --git a/ui/src/RecentFilesDrawer/ItemsList.tsx b/ui/src/RecentFilesDrawer/ItemsList.tsx
index 0f00bdd..e9cabd5 100644
--- a/ui/src/RecentFilesDrawer/ItemsList.tsx
+++ b/ui/src/RecentFilesDrawer/ItemsList.tsx
@@ -9,7 +9,6 @@ import { Folder, Workflow } from "../types/dbTypes";
import FilesListFolderItem from "./FilesListFolderItem";
import WorkflowListItem from "./WorkflowListItem";
import { Box } from "@chakra-ui/react";
-import { folderOnTopLocalStorageKey } from "./types";
import { userSettingsTable } from "../db-tables/WorkspaceDB";
export default function ItemsList({
@@ -26,20 +25,6 @@ export default function ItemsList({
const { onRefreshFilesList, draggingFile, refreshFolderStamp } =
useContext(RecentFilesContext);
- const handleDragLeave = (e: DragEvent) => {
- e.preventDefault();
- e.stopPropagation();
- const targetIsDroppable =
- e.relatedTarget instanceof Element &&
- e.relatedTarget.classList.contains("droppable") &&
- e.relatedTarget !== e.currentTarget;
- const targetIsChild = e.currentTarget.contains(e.relatedTarget as Node);
- // fixes a bug where the dragleave event is fired when dragging over a child element, causing elements to flicker
- if (targetIsDroppable || !targetIsChild) {
- setIsDraggingOver(false);
- }
- };
-
const handleDrop = async (e: DragEvent) => {
e.preventDefault();
e.stopPropagation();
@@ -72,13 +57,19 @@ export default function ItemsList({
))}
{
e.preventDefault();
e.stopPropagation();
setIsDraggingOver(true);
}}
- onDragLeave={handleDragLeave}
+ onDragLeave={(e) => {
+ e.preventDefault();
+ e.stopPropagation();
+ setIsDraggingOver(false);
+ }}
onDrop={handleDrop}
className="droppable"
>
diff --git a/ui/src/db-tables/FoldersTable.ts b/ui/src/db-tables/FoldersTable.ts
index 7dd9595..3553519 100644
--- a/ui/src/db-tables/FoldersTable.ts
+++ b/ui/src/db-tables/FoldersTable.ts
@@ -49,9 +49,9 @@ export class FoldersTable extends TableBase {
if (folder == null) {
return;
}
- const nameChanged = input.name != undefined && input.name != folder.name;
+ const nameChanged = "name" in input && input.name != folder.name;
const parentFolderChanged =
- input.parentFolderID != undefined &&
+ "parentFolderID" in input &&
input.parentFolderID != folder.parentFolderID;
const newRecord = {
...folder,
diff --git a/ui/src/utils.tsx b/ui/src/utils.tsx
index 7f61a94..1e2882c 100644
--- a/ui/src/utils.tsx
+++ b/ui/src/utils.tsx
@@ -157,7 +157,6 @@ export async function validateOrSaveAllJsonFileMyWorkflows(
for (const workflow of flowList) {
const fullPath = await generateFilePathAbsolute(workflow);
if (workflow.filePath != fullPath) {
- console.log(workflow.filePath, fullPath);
// file path changed
workflow.filePath != null &&
(await deleteFile(workflow.filePath, deleteEmptyFolder));