Closed mrekin closed 2 years ago
I got similar bug. When i chosed/clicked highlighted text i don't recive value of the label. When i clicked on row - not exacly on text (Place 2 on picture) i got correct value. Is there any solution to that problem ?
jquery-3.3.1 bootstrap-select1.14.0 bootstrap-5.0.1
@dugi07 I solved
as described below (in my fork), but not sure if it best way.
Thx @mrekin.
I'm thinking i had an oldest version before last pull request (it was 6 days ago). I tried to find line:
let dataLabel = e.currentTarget.getAttribute('data-label');
but i can't. I got only line 117. I overlooked latest version...
Ur suggestion really solve the problem in the last version.
Thx a lot agan !
What about pull request ? Wait for some js developer to commit changes.
Thanks @mrekin! Your solution helped me. I also created a PR here: https://github.com/gch1p/bootstrap-5-autocomplete/pull/17
Hi! Looks like problem exist with 'click' event handling.
Then you click on highlighted text in drop-down menu target has not button element but <span class=""text-primary"..> which does not have such attributes.
I solved this issue for myself by using currentTarget
but im not sure if it best solution (cause i'm not js developer) :) So I don't make pool request.
p/s also i add possibility to autocomplete more than one word (but it is 'duck' code, which replaces last entrance of 'lookup' variable, not whole input value - better solution to replace text before coursor position)