Skip to content

Conversation

@cgokey
Copy link
Collaborator

@cgokey cgokey commented Nov 7, 2025

Overview

What is the feature?

In testing, a issue was discovered toggling the radio button when multiple CustomRadioWidget where renders to a page.

What is the Solution?

Each input field needed a unique name.

What areas of the application does this impact?

Services->Service Options

Testing

Go to Services->Service Options
Click on Spatial->Point
Client on Aggregation->Concat Default
Try toggling each of those radio buttons to ensure that changing one doesn't change the other

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.12%. Comparing base (46ac4b9) to head (745d5b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1423   +/-   ##
=======================================
  Coverage   98.12%   98.12%           
=======================================
  Files         425      425           
  Lines        6838     6838           
  Branches     1456     1457    +1     
=======================================
  Hits         6710     6710           
  Misses        127      127           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

>
<input
className="d-flex form-check-input m-2"
id={`${id}-true`}
Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 Nov 8, 2025

Choose a reason for hiding this comment

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

Are the id values duplicates? I'm kind of confused why the name would be used here or contain the id value since the name should be what is on the view/display. If its on the same widget since that's the prop coming from the parent maybe we can append another part to the id value in each of the inputs or pass down a little more information where this gets rendered from

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Afaik this is being required by react-json-schema form, otherwise the form itself gets out of sync with the json data.

@eudoroolivares2016 eudoroolivares2016 changed the title Mmt 4038 MMT-4038: Fix issue where one input was affecting another on the form Nov 8, 2025
className="d-flex form-check-input m-2"
id={`${id}-true`}
name="true"
name={`${id}-true`}
Copy link
Contributor

Choose a reason for hiding this comment

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

This can just be name={id}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, we need to tack on -true to be make it unique.

className="form-check-input m-2"
id={`${id}-false`}
name="false"
name={`${id}-false`}
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to tack on -false to make it unique.

@cgokey cgokey merged commit 098ee83 into main Nov 10, 2025
7 checks passed
@cgokey cgokey deleted the MMT-4038 branch November 10, 2025 17:27
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.

5 participants