Replies: 1 comment
-
@davidyell Have you found any workaround for this? I'm trying to accomplish exactly what you are suggesting, and I've managed something by publishing modal blade template and then adding :class="{ 'overflow-hidden': !(typeof $wire.showOverflow !== 'undefined' && $wire.showOverflow), 'overflow-visible': (typeof $wire.showOverflow !== 'undefined' && $wire.showOverflow) }" I'm passing $showOverflow variable when dispatching event for opening modal, but this unfortunately breaks modal component, and I can only open and close it once, after that when I try to open modal it doesn't show up anymore. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
It would be great to be able to pass some tailwind classes into the modal as part of the event dispatch, so that individual modal event calls could be customised.
Use-case
I am opening a modal which has a dropdown inside it, with the existing
overflow-hidden
class on themodal.blade.php
the dropdown select element flows out of the modal and that overflow is hidden making the dropdown unusable.Solution options
A potential solution might be to pass the classes as an argument?
wire:click="$dispatch( 'openModal', { component: 'webhooks.get-webhook-secret', arguments: { webhook: {{ $hook->id }}, cssClass: 'overflow-visible' } } )"
Or, some way to pass the template file to use into the component, so users can overwrite the template in their local project?
Sidestep
Beta Was this translation helpful? Give feedback.
All reactions