Skip to content

Commit

Permalink
Update autocompleter_controller.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Aug 26, 2024
1 parent 840a00c commit c0a3740
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/javascript/controllers/autocompleter_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,8 @@ export default class extends Controller {
// Assign ID of any perfectly matching option, even if not expressly selected.
// This guards against user selecting a match, then, say, deleting a letter
// and retyping the letter. Without this, an exact match would lose its ID.
// NOTE: This does not fire if the user types out the exact match(!).
// It also doesn't handle multiple IDs when there is a separator.
updateHiddenId() {
this.verbose("autocompleter:updateHiddenId()");
if (this.COLLAPSE > 0) return;
Expand Down

0 comments on commit c0a3740

Please sign in to comment.