Call group.onChange only once

fix(checkbox): call group.onChange only once
Call group.onChange only oncefixcall group onchange only once checkbox

Committed by with-heart

commit message
fix(checkbox): call group.onChange only once

This change resolves an issue where `Checkbox` used inside
`CheckboxGroup` was calling `group.onChange` twice. This was resolved by
collecting `ownProps` for a `Checkbox` using `props` rather than
`mergedProps` (which already contained `group.onChange` if `Checkbox`
didn't have its own `onChange` prop).

Editor assessment

The subject states the behavioral rule exactly: group.onChange is called only once. The body then explains the root cause: Checkbox collected its own props rather than mergedProps, and mergedProps already contained group.onChange when the Checkbox lacked its own handler, causing the double invocation. Symptom, mechanism, and remedy in five lines, with precise identifier references throughout. The checkbox scope is a proper component noun and the fix type matches. No footers needed. An exemplary root-cause explanation in a small fix. The scope and type are also exactly right, leaving no dimension of the rubric unmet.

Browse categories

More fix examples · Back to search