Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

_mojtaba_'s avatar

how to find a way to catch select event on vuefinder

I'm trying to use Vuefinder (https://github.com/n1crack/vuefinder) as a file explorer in my Laravel-Vue custom page builder. According to the documentation: emit select event, with @select get selected files for online editors like tinymce/ckeditor However, when I use the following code: <vue-finder id='my_vuefinder' url="/files" @select="alert('selected')"></vue-finder> It doesn't seem to work - nothing happens when I select a file. I've tried looking through the source code to find where the select event is emitted, but I can't seem to find it anywhere.

I did notice that in vuefinder/src/components/Statusbar.vue, the vf-nodes-selected event is used to set the number of selected items, like this: emitter.on('vf-nodes-selected', (items) => { selectedItemCount.value = items.length; })

I'm not sure if there's a similar approach I can use to access the selected items data. Can anyone help me figure out what's going wrong?

0 likes
1 reply
piljac1's avatar

Your select event is probably emitted properly. What's not working in your case is alert('selected').

Vue sandboxes template expressions (which means they only expose a limitted amount of globals). See Restricted Globals Access for more info.

If you want to circumvent this problem, follow the suggested approach in the link above, or create a method in your script section that calls alert('selected') and call that method instead.

Please or to participate in this conversation.