Skip to content

Commit ceb3284

Browse files
committed
fix: update_link should be optional
1 parent 5e42b4a commit ceb3284

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sqlpage_spreadsheet",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "sqlpage spreadsheet component",
55
"source": "./src/spreadsheet_component.html",
66
"browserslist": "> 3%, last 2 versions, not dead",

src/spreadsheet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function setupErrorModal(resp_modal: HTMLElement) {
155155
}
156156

157157
async function handleUpdate(
158-
update_link: string,
158+
update_link: Props["update_link"],
159159
x: number,
160160
y: number,
161161
value: CellValue | null | undefined,
@@ -268,7 +268,7 @@ async function renderSpreadsheet(
268268

269269
function handleSetRangeValues(
270270
params: ISetRangeValuesMutationParams,
271-
update_link: string,
271+
update_link: Props["update_link"],
272272
errorModal: ReturnType<typeof setupErrorModal>,
273273
) {
274274
const { cellValue } = params;
@@ -295,7 +295,7 @@ type Zod = typeof import("zod");
295295

296296
const PropsSchema = (z: Zod) =>
297297
z.object({
298-
update_link: z.string(),
298+
update_link: z.string().optional(),
299299
freeze_x: z.number().int().nonnegative().default(0),
300300
freeze_y: z.number().int().nonnegative().default(0),
301301
});

0 commit comments

Comments
 (0)