[V3-1-test] Fix Trigger UI form rendering for null enum values (#62060)#62767
Merged
Conversation
* Fix Trigger UI form rendering for null enum values
* fix: preserve original type when selecting numeric enum in FieldDropdown
When a numeric enum value (e.g. 6) was selected, the Select component
returned a string ('6'). The old code stored the string directly, causing
a 400 Bad Request since backend validation expects the integer 6.
Fix: look up the original typed value from schema.enum using the string
as a key, and store that instead of the raw string from the UI.
Regression test added to FieldDropdown.test.tsx.
* fix: resolve ts-compile-lint-ui ESLint errors in FieldDropdown
- Broaden ParamSchema.enum type to Array<boolean | number | string | null>
to accurately reflect JSON Schema enum values (fixes no-unnecessary-condition)
- Update labelLookup signature to accept boolean
- Switch null-check ternaries to nullish coalescing (??) in FieldDropdown.tsx
- Add eslint-disable for no-unsafe-member-access on any-typed mockParamsDict access
- Remove stale/unused eslint-disable-next-line comments
* fix: handle null enum values in FieldMultiSelect TypeScript types
(cherry picked from commit 4d3230c)
pierrejeambrun
approved these changes
Mar 3, 2026
vatsrahul1001
added a commit
that referenced
this pull request
Mar 4, 2026
* Fix Trigger UI form rendering for null enum values
* fix: preserve original type when selecting numeric enum in FieldDropdown
When a numeric enum value (e.g. 6) was selected, the Select component
returned a string ('6'). The old code stored the string directly, causing
a 400 Bad Request since backend validation expects the integer 6.
Fix: look up the original typed value from schema.enum using the string
as a key, and store that instead of the raw string from the UI.
Regression test added to FieldDropdown.test.tsx.
* fix: resolve ts-compile-lint-ui ESLint errors in FieldDropdown
- Broaden ParamSchema.enum type to Array<boolean | number | string | null>
to accurately reflect JSON Schema enum values (fixes no-unnecessary-condition)
- Update labelLookup signature to accept boolean
- Switch null-check ternaries to nullish coalescing (??) in FieldDropdown.tsx
- Add eslint-disable for no-unsafe-member-access on any-typed mockParamsDict access
- Remove stale/unused eslint-disable-next-line comments
* fix: handle null enum values in FieldMultiSelect TypeScript types
(cherry picked from commit 4d3230c)
Co-authored-by: Subham <subhamsangwan26@gmail.com>
81 tasks
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.
Backport of #62060
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.