fix(databases): render array column items with their element type - #3151
Merged
Conversation
The string fallback in the row column renderer exists for the spreadsheet inline cell editor, where an entire array is edited as one comma-separated textarea. It keyed off `column.array` (the column definition) rather than the `array` prop (the render mode). In the full row create/edit form, columnItem renders one Column per array element and deliberately omits the `array` prop so each item gets its element-type input. Since `column.array` was still true, every item collapsed to a string input -- a Boolean[] column showed "Enter string". This also caused intermittent save failures: the string component still ran parseValue() against column.type, so literal true/false/1/0 coerced and saved, while anything else yielded null, and a null inside a typed array is rejected by the API. Keying off the `array` prop restores per-item typed inputs (boolean select, number input with min/max, date picker) while leaving the spreadsheet cell editor and its "Advanced edit" link untouched, since only the two fromSpreadsheet branches pass `array`.
Console (appwrite/console)Project ID: Tip GraphQL API works alongside REST and WebSocket protocols |
Contributor
Greptile SummaryThe PR corrects array-item component selection in database row forms while retaining the string-based spreadsheet editor, and separately updates the
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "chore(deps): raise the js-yaml floor to ..." | Re-trigger Greptile |
GHSA-5p4m-2wfm-xmqj (CVE-2026-59870) covers >=4.0.0 <4.3.1 and the fix was not backported, so the existing >=4.3.0 override stopped clearing it and the audit step in tests.yml now fails on every branch. It reaches us transitively via eslint > @eslint/eslintrc > js-yaml. Only the pinned floor and the resolved version move; integrity hashes are untouched.
ArnabChatterjee20k
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Fixes array columns being rendered as
stringinputs in the row create/edit form, regardless of the column's actual element type.Reported against 1.9.6: a
Boolean[]column renders a text field ("Enter string") for each item instead of a boolean select.Boolean[]hint...+ Add itemproduces a string inputRoot cause
column.sveltedecided the input component like this:this={column.array || (isSpatialType(column) && limited) ? columnsTypeMap['string'] : columnsTypeMap[column.type]}The string fallback exists for the spreadsheet inline cell editor, where an entire array is edited as one comma-separated textarea. But it keyed off
column.array(the column definition) instead of thearrayprop (the render mode).In the full row form,
columnItem.svelterenders one<Column>per array element and deliberately does not passarray, so each item should get its element-type input. Becausecolumn.arraywas stilltrue, every item collapsed to the string input.This also explains the intermittent save failures in the report. The string component still runs
parseValue()againstcolumn.type, so typing literallytrue/false/1/0coerced correctly and saved — anything else returnednull, and anullinside a typed array is rejected by the API.The fix
One line — key off the
arrayprop:this={array || (isSpatialType(column) && limited) ? columnsTypeMap['string'] : columnsTypeMap[column.type]}Array items now render their proper inputs: boolean select (True/False/NULL), number input with
min/max, date picker, etc.Scope
arrayis only ever passed by the twofromSpreadsheetbranches incolumnItem.svelte, so the compact comma-separated cell editor and its "Advanced edit" link are unchanged.Columnis used nowhere outsidecolumnItem.svelte.formatbranch short-circuits above this.tablesdbanddocumentsdbalike.Test Plan
Boolean[],Integer[], andDatetime[]columns.+ Add itemnow yields the correct typed input; saving succeeds.Verified locally:
bun run check(0 errors),bun run lint(0 errors),bun run test:unit(239 passed),bun run build(compiles clean; the Sentry source-map upload step needs a token and is skipped locally).Related PRs and Issues
Reported in Discord (1.9.6 console, MongoDB-backed database).
Have you read the Contributing Guidelines on issues?
Yes.