{{ message }}
fix: preserve colOptions on metadata-only PATCH for SingleSelect/MultiSelect#13052
Merged
fendy3002 merged 2 commits intonocodb:developfrom Feb 20, 2026
Merged
Conversation
…iSelect columns When a PATCH request updates only metadata fields (e.g. description, title) on a SingleSelect or MultiSelect column without including colOptions in the request body, the existing dropdown options should be preserved. Previously, the options-processing block was skipped entirely when colOptions was not provided, which either silently dropped the metadata update or -- in certain code paths through Column.update -- caused the existing options to be deleted and not re-created. This fix populates colBody.colOptions from the existing column's colOptions when the request doesn't include them, ensuring the full update flow proceeds normally while preserving the dropdown options. Fixes nocodb#13044
Contributor
Author
fendy3002
approved these changes
Feb 20, 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.

Fixes #13044
Problem
When sending a PATCH request that only updates metadata fields (like
descriptionortitle) on a SingleSelect/MultiSelect column without includingcolOptions, the existing dropdown options get lost.This happens because the SingleSelect/MultiSelect code path in
columnUpdatecheckscolBody.colOptions?.optionsto decide whether to process the options block. WhencolOptionsisn't provided, the entire block is skipped -- which means either:Column.updateorupdateMetaAndDatabasecall happens)Column.updatedeletes the existing options but doesn't re-insert them since there are none incolBodyThis is the same class of bug that was fixed for
cdfin #12974.Fix
After calling
getColumnPropsFromUIDT, check ifcolBody.colOptions?.optionsis missing but the existing column has options. If so, carry over the existing options tocolBody. This way the full update flow proceeds normally, the options are preserved, and metadata-only changes (description, title, etc.) are actually applied.Reproduction