When mergeProps merges with null it becomes null. Is that correct? #3041
-
Requested:
Expected:
Got:
|
Beta Was this translation helpful? Give feedback.
Answered by
snowystinger
Apr 15, 2022
Replies: 1 comment
-
That's coming from https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/utils/src/mergeProps.ts#L45 We could probably ignore null/undefined for props with the name prefix |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rostero1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's coming from https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/utils/src/mergeProps.ts#L45
where we check that the two props we are merging are functions.
We could probably ignore null/undefined for props with the name prefix
on
. We could justcontinue
so we don't add them in.