corejavascript / corejavascript/typeahead.js

onChange fires before value is updated [When Clicked]

Open
#252 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
968
Forks
231
PR merge metrics
No merged PRs in 30d

Description

The below gif should describe the problem
![Alt Text](https://i.stack.imgur.com/9vHgw.gif)

I believe the issue is due to the blur effect called by the hiding of the menu after the click
The TypeAhead JS code looks like

` $('#typeahead_id').typeahead({
name: 'typeahead',
remote: 'search.php?key=%QUERY,
limit: 10
});`

And the html for the input

`Team Name:

`;

The update Param method

` function update_params(val, id) {
let temp = nodes[id]
temp.params[val] = $("#" + val + id).val()
console.log(temp)
}`

The oddness of this can be explained in that each of the blue boxes is referred to as a node, and can have their own unique typeahead.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.