We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The props that have default values, are not used in the event.target from onChange
props
event.target
onChange
v2.3.2
In v2.3.2 the props were defaulted via defaultProps;
defaultProps
checkbox/src/index.jsx
Lines 6 to 18 in 22992a5
Which meant that in the onChange target would use these defaulted props;
target
Lines 59 to 63 in 22992a5
v3.0.0
However in v3.0.0, the props are only defaulted in the destructuring;
checkbox/src/index.tsx
Lines 30 to 40 in cfdcf03
Lines 71 to 75 in cfdcf03
in v2.3.2; <Checkbox onChange={(e) => console.log(e.target.type)} {...otherProps} />; will log "checkbox" in v3.0.0; <Checkbox onChange={(e) => console.log(e.target.type)} {...otherProps} />; will log undefined
<Checkbox onChange={(e) => console.log(e.target.type)} {...otherProps} />;
"checkbox"
undefined
The text was updated successfully, but these errors were encountered:
PR is welcome~
Sorry, something went wrong.
closed 8a16023
No branches or pull requests
Issue
The
props
that have default values, are not used in theevent.target
fromonChange
v2.3.2
functionalityIn
v2.3.2
theprops
were defaulted viadefaultProps
;checkbox/src/index.jsx
Lines 6 to 18 in 22992a5
Which meant that in the
onChange
target
would use these defaulted props;checkbox/src/index.jsx
Lines 59 to 63 in 22992a5
v3.0.0
functionalityHowever in
v3.0.0
, theprops
are only defaulted in the destructuring;checkbox/src/index.tsx
Lines 30 to 40 in cfdcf03
Which means the defaulted values are not used for
target
;checkbox/src/index.tsx
Lines 71 to 75 in cfdcf03
Summary
in
v2.3.2
;<Checkbox onChange={(e) => console.log(e.target.type)} {...otherProps} />;
will log"checkbox"
in
v3.0.0
;<Checkbox onChange={(e) => console.log(e.target.type)} {...otherProps} />;
will logundefined
The text was updated successfully, but these errors were encountered: