Is there a callback for when an item is selected?
I need to prevent the default functionality and call another function when an item is selected from the dropdown. Is that possible?
Seems we need to override the method, via hack or some new feature?
https://github.com/fritx/vue-at/blob/ec002402ab875150558bbcc4f84d5deb3fa87be4/src/At.vue#L161-L164
A new feature would be ideal! This seems like it should be a standard hook. No?
@jetlej seems we already have an @insert event
https://github.com/fritx/vue-at/blob/ec002402ab875150558bbcc4f84d5deb3fa87be4/src/At.vue#L452-L453
@fritx - How would I interact with that? Can I cancel the handleInput() somehow so the text isn't inserted?
~~@jetlej Try the following example ;)~~
<at @insert="handleInsert">
<your-editor-here>
</at>
handleInsert (item) {
console.log('inserted', item)
}
@jetlej ah, sorry, you wanted to prevent the default one... so that a feature is required.