if (!keep && chunk.length>0) {
this.$emit('at', chunk)
}
Given that chunk length is 0 at the moment of the selection (nothing else was typed), the event is not emitted.
Background
I'm trying to use the <at-ta /> (At Textarea) component but I don't have a way to track changes in the text area after selecting one of the members other than hooking to the at event.
Hooking on the at event works, but it doesn't if I select one of the list members right after typing @.
Possible fixes
1) Change the above if condition so that it emits the event even if the chunk.length is 0.
2) Emit a different event (e.g textarea input event) that we can hook on when a member selection is performed.
Update: Seems that we have an inserted event that gets triggered for the at-textarea component in the latest version. Will use that version instead of 2.x.
Version: 2.x Browser: Chrome
Description
When typing
@
and selecting one of the options without typing anything else, theat
event is not fired.My suspicion is this code here:
Given that
chunk
length is 0 at the moment of the selection (nothing else was typed), the event is not emitted.Background
I'm trying to use the
<at-ta />
(At Textarea) component but I don't have a way to track changes in the text area after selecting one of the members other than hooking to theat
event.Hooking on the
at
event works, but it doesn't if I select one of the list members right after typing@
.Possible fixes
1) Change the above
if
condition so that it emits the event even if thechunk.length
is 0.2) Emit a different event (e.g textarea
input
event) that we can hook on when a member selection is performed.