-
Notifications
You must be signed in to change notification settings - Fork 763
feat(Modal/Slideover): add close
method in slots
#4219
New issue
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
Conversation
5591d5d
to
9d2fb6f
Compare
commit: |
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.
This is a nice addition but it would even be better if the Reka UI DialogRoot
component could expose this directly π€
Yeah I thought so too, having it from the DialogRoot would be ideal. I've got the change for Reka UI needed in this PR, so I can create the PR there. I'll update this PR later with the changes if I'm able to get it merged into Reka. |
Feel free to link the PR here once ready so I can have a look. Having it in DialogRoot would benefit the Modal, Slideover and Drawer components, this could be useful to implement this in the Popover as well. |
4a7cac3
to
6b6dadf
Compare
I've worked on the current implementation it a little bit more this morning and I think my approach now is cleaner for doing the closing internally with NuxtUI by introducing internal state for open using useVModel. I'll still create the PR for DialogRoot as it does make it cleaner without adding a local useVModel to each component. |
6d78674
to
4d3082b
Compare
Hey @benjamincanac, the updates to Reka UI have been completed and i've also updated the slideover to support the same design in this PR, for the Drawer vaul-vue will need a version bump. There are conflicts with the new version of Reka UI and the Calendar / Textarea, the version will need to be bumped and the conflict resolved before this can be merged. |
@JosephAnson There are quite a few changes necessary to upgrade to |
close
method in slots
This branch now has |
120f6d7
to
fbf2e77
Compare
fbf2e77
to
9b2a0cd
Compare
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 ended up removing the examples to demonstrate this inside the With footer slot
!
close
method in slotsclose
method in slots
As a note, we'll need to do this in the Drawer component as well (which requires an update on |
I can make a PR for reka popover if you'd like? I've already made the PR for vaul-vue here: unovue/vaul-vue#106 |
π Linked issue
β Type of change
π Description
Implemented programmatic close method for Modal component scoped slots.
New Feature:
Documentation Updates:
Benefits:
Old ref management way
New slot close method
π Checklist
Considerations
The only way to expose the Dialog functionality was to create a new ModalContext.vue and expose the injected code via a slot, however maybe editing the Reka UI Dialog component to expose their methods on the DialogRoot might make things less complicated.