fast icon indicating copy to clipboard operation
fast copied to clipboard

Fix/React wrapper props fix

Open bennyrags opened this issue 1 year ago • 1 comments

Pull Request

📖 Description

The current React.createElement function takes as an parameter the object newReactProps to pass props to the created React component. But we have noticed that some props are not being passed to our React components. When I tested this, I noticed these attributes were not getting passed to newElementProps object but not the newReactProps.

This fix changes the second parameter passed in React.createElement to an object that includes both objects, spread. After making this fix, all attributes passed from our web components to their React counterparts.

This is my first attempt at contributing and I realize this change may have performance or other implications. I'm not sure this is the correct fix, but it does solve this issue for us. I'd be happy to test performance or anything else with a bit of guidance from your team.

🎫 Issues

#6826

👩‍💻 Reviewer Notes

Please let me know if there's anything more you need from me or if there's something you think I'm missing.

📑 Test Plan

I ran Lerna tests (and noted this below in the checkbox for tests) I'd like to test the performance implicaitons of this, but I'm not sure how to do that

✅ Checklist

General

  • [x] I have included a change request file using $ yarn change
  • [ ] I have added tests for my changes.
  • [x] I have tested my changes.
  • [ ] I have updated the project documentation to reflect my changes.
  • [x] I have read the CONTRIBUTING documentation and followed the standards for this project.

bennyrags avatar Apr 17 '24 18:04 bennyrags

@microsoft-github-policy-service agree company="Thomson Reuters"

bennyrags avatar Apr 17 '24 18:04 bennyrags

Closing this issue as we are no longer supporting this package, this is part of ongoing work to re-align the project. My apologies for not addressing this issue beforehand, see #6963.

janechu avatar May 22 '24 15:05 janechu