diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte
index bb5e31ff5d..720c449d01 100644
--- a/packages/builder/src/components/backend/DataTable/DataTable.svelte
+++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte
@@ -39,9 +39,7 @@
{#if !isInternal}
{/if}
- {#if !isUsersTable}
-
- {/if}
+
diff --git a/packages/builder/src/components/backend/DataTable/buttons/sheet/SheetImportButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/sheet/SheetImportButton.svelte
index 88e8e213ef..d54f00c203 100644
--- a/packages/builder/src/components/backend/DataTable/buttons/sheet/SheetImportButton.svelte
+++ b/packages/builder/src/components/backend/DataTable/buttons/sheet/SheetImportButton.svelte
@@ -2,7 +2,13 @@
import ImportButton from "../ImportButton.svelte"
import { getContext } from "svelte"
+ export let disabled = false
+
const { rows, tableId } = getContext("sheet")
-
+
diff --git a/packages/server/src/api/controllers/row/index.ts b/packages/server/src/api/controllers/row/index.ts
index 1801bcd208..f48d9bcf26 100644
--- a/packages/server/src/api/controllers/row/index.ts
+++ b/packages/server/src/api/controllers/row/index.ts
@@ -50,7 +50,7 @@ export async function patch(ctx: any): Promise {
ctx.body = row
// Notify websocket change
- spreadsheetSocket.emit("row-update", { id: row._id })
+ spreadsheetSocket?.emit("row-update", { id: row._id })
} catch (err) {
ctx.throw(400, err)
}
@@ -75,7 +75,7 @@ export const save = async (ctx: any) => {
ctx.body = row
// Notify websocket change
- spreadsheetSocket.emit("row-update", { id: row._id })
+ spreadsheetSocket?.emit("row-update", { id: row._id })
}
export async function fetchView(ctx: any) {
const tableId = getTableId(ctx)
@@ -115,7 +115,7 @@ export async function destroy(ctx: any) {
for (let row of rows) {
ctx.eventEmitter && ctx.eventEmitter.emitRow(`row:delete`, appId, row)
// Notify websocket change
- spreadsheetSocket.emit("row-update", { id: row._id })
+ spreadsheetSocket?.emit("row-update", { id: row._id })
}
} else {
let resp = await quotas.addQuery(() => pickApi(tableId).destroy(ctx), {
@@ -126,7 +126,7 @@ export async function destroy(ctx: any) {
row = resp.row
ctx.eventEmitter && ctx.eventEmitter.emitRow(`row:delete`, appId, row)
// Notify websocket change
- spreadsheetSocket.emit("row-update", { id: row._id })
+ spreadsheetSocket?.emit("row-update", { id: row._id })
}
ctx.status = 200
// for automations include the row that was deleted