Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocomplete search option not working when using external source #85

Open
duckduckhero opened this issue Apr 6, 2020 · 0 comments
Open

Comments

@duckduckhero
Copy link

duckduckhero commented Apr 6, 2020

while($row = mysqli_fetch_array($result)){ $user = array('value'=>$row['name'], 'uid'=>'user:'.$row['u_id']); array_push($user_data, $user); } $output = json_encode($user_data); echo $output;

I used the above get_users.php code to return the list of users in a JSON form.
Then, I used the following JS code to implement mention feature in my html webpage.

$('.mentions').mentionsInput({ source: 'get_users.php', showAtCaret: true });

It seemed to work fine at first, but soon I realized that the autocomplete search(?) function was not working. That is, when I type in "Jeff" for example, the list will not show me the corresponding "Jeff Lee", but it will just stay the same and not change. Can anyone please tell me how I can fix this? Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant