fix: disable Others input when it isn't the selected option#9784
Merged
Conversation
* fix: disable Others input when it isn't the selected option * fix the bad fallback
Contributor
There was a problem hiding this comment.
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. |
| ).toBeInTheDocument() | ||
| }) | ||
|
|
||
| it('disables the "Others" input when another option is selected', async () => { |
scottheng96
approved these changes
Jul 23, 2026
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Closes #9352
Merges #9677