CreativeBulma / bulma-tagsinput

Bulma's extension providing user interface to manage tags supporting autocomplete.
MIT License
63 stars 21 forks source link

Configuration option trim: true has incorrect trimming behaviour in `source` #28

Open jackward-countdown opened 3 years ago

jackward-countdown commented 3 years ago

eg if you have a source:

source: async function(value) {
   console.log(value);
   return [value];
}

You would expect that whatever the user typed will always appear in the list of available tags.

This is not the case when dealing with strings such as the following:

'Something A'
'Something B'

Because the value that is sent to the source function for these 2 values is:

SomethingA
SomethingB

As soon as the second word in this string is more than one character, correct behaviour resumes.