fix(uve): scope radio and checkbox inputs by field variable name#35433
fix(uve): scope radio and checkbox inputs by field variable name#35433
Conversation
Add [name]="field.variable" to p-radioButton and p-checkbox in the quick-edit form so each field's inputs are grouped independently. Without this binding PrimeNG shares a single internal name across all fields, causing selections in one field to affect another. Closes #35432 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @zJaaal's task in 1m 0s —— View job PR Review
HTML change — correct and minimal. One thing to flag in the tests: The behavioral isolation tests ( The actual bug was browser-native visual grouping: two radio/checkbox groups sharing the same The isolation tests aren't wrong, they just don't prove what their comments imply. Not blocking, but a future reader might draw incorrect conclusions from the test descriptions. Otherwise clean. |
Extend the [name]="field.variable" fix to the binary p-checkbox branch. Without it, two binary checkbox fields could share PrimeNG's internal default name and interfere with each other. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…com/dotCMS/core into fix/uve-radio-checkbox-name-binding
Add tests that assert each p-radioButton and p-checkbox renders with a name attribute matching its field variable, and that two fields of the same type do not share a name group (isolation). Covers multi-option checkboxes, binary checkboxes, and radio groups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Using forEach on expect is a silent false-positive risk — if the queried array is empty all assertions pass. Switch to it.each so each option value gets its own named test case with a single targeted expect, querying by the specific inputId (field.variable-option.value). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sertions - Replace generic 'input[type="checkbox"]' selector with '#active' in binary checkbox test so it fails explicitly if name is missing - Add form control value assertions to both isolation tests: after setting a value on field A, verify field B's control is unchanged — this catches actual grouping regressions, not just DOM attribute state - Remove forbidden non-null assertion (!) in favor of optional chaining Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
We lost this changes after a merge queue incident Main PR dotCMS#35433 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
[name]="field.variable"top-radioButtonandp-checkboxin the@forloop so each field's inputs are scoped independently by their unique variable nameCloses #35432
Test plan
🤖 Generated with Claude Code