-
Notifications
You must be signed in to change notification settings - Fork 712
feat(Slideovers): Allow multiple instances of programmatic slideover #1758
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
Tagging @noook for feedback |
74aee7b
to
7253ac5
Compare
There is an issue: Slideovers should be dismissable when clicking outside unless you explicitly prevent them from closing with the appropriate prop. Your example components do not specify it so it should keep the original behaviour: |
The code changes in `Slideovers.client.vue` remove the unused `<pre>` element that displayed the `slideoverInstances` props. This cleanup improves code readability and removes unnecessary code.
I fixed it by listening to model changes on the modal and closing it when the model is changed. An issue I run into is that when clicking on the outside, it always closes the first one that was open, rather than the last one (i.e. the one on top). This issue would probably happen if we implement something similar in @noook Open to suggestions. |
Would it be possible to apply the same changes to the |
7ba6b19
to
69f605f
Compare
# Conflicts: # docs/components/content/examples/SlideoverExampleComponent.vue
@benjamincanac I updated this PR to move it along. A caveat that I ran into, (maybe its not a major issue?) is the What this means in practice is that when I don't think there is a way to get around this limitation at the moment without doing some gymnastics around the We can document this limitation and roll with it, or wait until the next major release and deal with it then when we move to Let me know your thoughts. If we decide to roll with it, I can make the same changes to the |
@genu Sorry for the delay!! Should we really release this with the Headless UI limitation though? I would rather implement this only in the |
I agree, not a big fan releasing a half baked solution. I'm fine with revisiting this feature with the release of v3. As a side note, I have been playing with Perhaps for v3, it can be used as an inspiration. |
Should we close this then? If you want to work on this, you can make a pull request against the |
π Linked issue
β Type of change
π Description
This PR opens the possibility to open multiple instance of the
<Slideover/>
component using theuseSlideover()
composable.This capability was discussed in the past, so this is an attempt at such a feature.
π Checklist