fix: icon.

fix: wrong format on event, temp patch.
This commit is contained in:
Darshan
2026-02-13 16:21:23 +05:30
parent 4b4477e273
commit b84ecd309b
2 changed files with 17 additions and 1 deletions
+12
View File
@@ -20,6 +20,18 @@
let error: string;
// TODO: Remove this once Pink Svelte is fixed
$: if (value !== null && typeof value === 'object' && 'target' in (value as object)) {
const event = value as Event;
const target = event.target as HTMLInputElement;
if (target?.value !== undefined) {
const parsedValue = target.value === '' ? null : Number(target.value);
value = Number.isNaN(parsedValue) ? null : parsedValue;
} else {
value = null;
}
}
const handleInvalid = (event: Event & { currentTarget: EventTarget & HTMLInputElement }) => {
event.preventDefault();
@@ -393,7 +393,11 @@
{#each updatedColumnsForSheet as column, index (column.key)}
{@const isId = column.key === '$id'}
{@const option = columnOptions.find((option) => option.type === column.type)}
{@const option = columnOptions.find(
(option) =>
option.type === column.type &&
option.format === ('format' in column ? column.format : undefined)
)}
{@const isSelectable =
column['system'] || column.type === 'relationship' ? 'disabled' : true}
<Spreadsheet.Row.Base {root} select={isSelectable} id={column.key}>