protonemedia / laravel-splade

💫 The magic of Inertia.js with the simplicity of Blade 💫 - Splade provides a super easy way to build Single Page Applications (SPA) using standard Laravel Blade templates, and sparkle it to make it interactive. All without ever leaving Blade.
https://splade.dev
MIT License
1.47k stars 111 forks source link

Question: How to use the ClickOutside component #519

Closed thecyrilcril closed 7 months ago

thecyrilcril commented 1 year ago

You may use the built-in Artisan Command to show the installed versions of the packages:

php artisan splade:show-versions

Description:

It tried to use the clickoutside component like so

<x-splade-outside do="() => data.open = false" opened="true">
...
</x-splade-outside>

but could not get it to work

Steps To Reproduce Issue:

pascalbaljet commented 7 months ago

The outside component is undocumented, only meant for internal use, and unsupported.

Maybe try onClickOutside from VueUse (https://vueuse.org/core/onClickOutside/)