Skip to content

fix: allow empty only fix: actually allowed an empty value before a value was selected once, and not reset#10940

Open
tthornton3-chwy wants to merge 1 commit into
swagger-api:masterfrom
tthornton3-chwy:bugfix/allow-empty-not-resetting
Open

fix: allow empty only fix: actually allowed an empty value before a value was selected once, and not reset#10940
tthornton3-chwy wants to merge 1 commit into
swagger-api:masterfrom
tthornton3-chwy:bugfix/allow-empty-not-resetting

Conversation

@tthornton3-chwy

@tthornton3-chwy tthornton3-chwy commented Jun 24, 2026

Copy link
Copy Markdown

Description

The allow empty option works if you had never selected a value in the array selector widget. As soon as you selected, and unselected, something though, it would never send ?state= again. Only a refresh would allow this to work again.

fixes: #10941

Motivation and Context

This change fixes an incoming issue where allow empty does not function properly after a value for the array is selected / unselected once.

I will create an issue and tag it momentarily.

How Has This Been Tested?

I have tested this locally, as well as included tests in the PR.

I used an api spec similar to this:

{
                        "name": "status",
                        "in": "query",
                        "description": "Find Something.",
                        "style": "form",
                        "explode": true,
                        "allowEmptyValue": true,
                        "schema": {
                            "anyOf": [
                                {
                                    "type": "array",
                                    "items": {
                                        "type": "string",
                                        "description": "Something.",
                                        "enum": [
                                            "FOO",
                                            "BAR"
                                        ]
                                    }
                                },
                                {
                                    "type": "null"
                                }
                                
                            ]
                        }
                    },

it functioned properly after my fix.

Screenshots (if appropriate):

Screenshot 2026-06-24 at 9 28 32 AM

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Allow Empty Value" only works before you select then unselect something from the array list

1 participant