Skip to content

fix: disable Others input when it isn't the selected option#9784

Merged
eliotlim merged 1 commit into
developfrom
fix/others-input-disabled-state
Jul 23, 2026
Merged

fix: disable Others input when it isn't the selected option#9784
eliotlim merged 1 commit into
developfrom
fix/others-input-disabled-state

Conversation

@LoneRifle

Copy link
Copy Markdown
Contributor

Closes #9352
Merges #9677

* fix: disable Others input when it isn't the selected option

* fix the bad fallback
@LoneRifle
LoneRifle requested review from a team and Copilot July 23, 2026 03:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Updates Radio and Checkbox “Others” free-text inputs so they are disabled (greyed out) when “Others” isn’t the active selection, improving clarity that the typed text won’t be used unless “Others” is chosen.

Changes:

  • Disable the Radio “Others” input unless the “Others” radio option is selected.
  • Disable the Checkbox “Others” input when checked options don’t include “Others”.
  • Add regression tests covering the disabled-state behavior for both fields.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
apps/frontend/src/templates/Field/Radio/RadioField.tsx Adds conditional disabling for the “Others” text input based on selected radio value.
apps/frontend/src/templates/Field/Radio/RadioField.test.tsx Adds a test verifying the “Others” input disables after switching away from “Other”.
apps/frontend/src/templates/Field/Checkbox/CheckboxField.tsx Adds conditional disabling for the “Others” text input when “Others” isn’t among selected checkboxes.
apps/frontend/src/templates/Field/Checkbox/CheckboxField.test.tsx Adds a test verifying the “Others” input disables after selecting a non-“Others” option.

Comment thread apps/frontend/src/templates/Field/Radio/RadioField.tsx
).toBeInTheDocument()
})

it('disables the "Others" input when another option is selected', async () => {
@mergify

mergify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@eliotlim
eliotlim merged commit 40e2db3 into develop Jul 23, 2026
44 checks passed
@eliotlim
eliotlim deleted the fix/others-input-disabled-state branch July 23, 2026 07:24
Copilot stopped work on behalf of LoneRifle due to an error July 23, 2026 07:24
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.

"Others" field should be disabled when not chosen

5 participants