fix(databases): correct enum icon and hide indexed checkbox for relationships#3114
Conversation
…ionships The create-index column selector matched icons by type only, so enum columns (type: string, format: enum) fell through to the first string-typed option and showed the email icon. The columns table also showed an "Indexed" checkbox for relationship columns, which can't be indexed.
Greptile SummaryThis PR fixes two display bugs in the database table UI. The icon lookup in the create-index field selector now matches on both
Confidence Score: 5/5Both changes are narrowly scoped UI fixes with no data mutations; safe to merge. The icon lookup change correctly mirrors the existing guard already in use in the columns page, and the relationship checkbox hide uses a well-tested helper applied consistently throughout the file. No logic paths, data flows, or API calls are altered. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(databases): treat empty format as no..." | Re-trigger Greptile |
Mirrors the truthiness guard already used in columns/+page.svelte, so an empty-string format from the API falls back to undefined instead of failing to match any option and dropping the icon.
Summary
enumcolumns in the create-index field selector — the lookup matched bytypeonly, and since email/ip/url/enum/string columns all sharetype: 'string', it always resolved to the first match (Email's mail icon) instead of the enum-specific icon.Test plan
enumcolumn, start "Create index", confirm the field selector shows the correct enum iconbun run check/bun run lintpass for the touched files