diff --git a/packages/client/src/components/app/spreadsheet/NumberCell.svelte b/packages/client/src/components/app/spreadsheet/NumberCell.svelte new file mode 100644 index 0000000000..2e0ef27c39 --- /dev/null +++ b/packages/client/src/components/app/spreadsheet/NumberCell.svelte @@ -0,0 +1,5 @@ + + + diff --git a/packages/client/src/components/app/spreadsheet/Spreadsheet.svelte b/packages/client/src/components/app/spreadsheet/Spreadsheet.svelte index e20e5879ff..6275934b3a 100644 --- a/packages/client/src/components/app/spreadsheet/Spreadsheet.svelte +++ b/packages/client/src/components/app/spreadsheet/Spreadsheet.svelte @@ -6,6 +6,7 @@ import OptionsCell from "./OptionsCell.svelte" import DateCell from "./DateCell.svelte" import MultiSelectCell from "./MultiSelectCell.svelte" + import NumberCell from "./NumberCell.svelte" export let table export let filter @@ -83,6 +84,8 @@ return DateCell } else if (type === "array") { return MultiSelectCell + } else if (type === "number") { + return NumberCell } return TextCell } diff --git a/packages/client/src/components/app/spreadsheet/TextCell.svelte b/packages/client/src/components/app/spreadsheet/TextCell.svelte index fb8b208831..47e30aae2d 100644 --- a/packages/client/src/components/app/spreadsheet/TextCell.svelte +++ b/packages/client/src/components/app/spreadsheet/TextCell.svelte @@ -2,6 +2,7 @@ export let value export let selected = false export let onChange + export let type = "text" const handleChange = e => { onChange(e.target.value) @@ -9,7 +10,7 @@ {#if selected} - + {:else}
{value || ""}