-
Notifications
You must be signed in to change notification settings - Fork 139
feat: Pass all listeners to render function in CFlex, Stack #460
feat: Pass all listeners to render function in CFlex, Stack #460
Conversation
🦋 Changeset detectedLatest commit: af04f8b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@simpletrontdip is attempting to deploy a commit to the Chakra UI Team on Vercel. A member of the Team first needs to authorize it. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit af04f8b:
|
This pull request is being automatically deployed with Vercel (learn more). chakra-ui-vue – ./🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui-vue/AJkhsY9w4xcTGQZaTGNH3gu8jJBG [Deployment for af04f8b canceled] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @simpletrontdip for this PR. It's a great example of what open source should be.
Everything looks solid otherwuse
Will add a changeset and then merge it. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that there might be some old snapshots that were not removed in this PR. Not updating them will fail on CI.
You can run yarn run test:core -u
tup update the snapshots and then push again. Everything should be fine after that.
I've updated the snapshots, thanks ^^ |
@all-contributors please add @simpletrontdip for bugs, code and tests |
I've put up a pull request to add @simpletrontdip! 🎉 |
Description
It's quite common for container components like CFlex, CStack to receive custom listeners such as
click, blur
.It will be especially helpful and more common to have them when rendering with custom component
as
prop.It is more intuitive to have all
listeners
passed down by default.As in #452, when rendering CStack as a form, we are unable to receive its onSubmit, then we have to create a wrapper outside CStack, this may break HTML structure and break our CSS selectors, which is not really ideal.
So here, we include all
computedListeners
into the render function, allow components to receive it.Closes #452
How Has This Been Tested?
describe
phrase to make test results more readableTypes of changes
Checklist: