Skip to content

autocomplete() should trigger autocomplete event even when text already matches #132

Open
@RickMohr

Description

@RickMohr

Currently, autocomplete() doesn't trigger the autocomplete event if the input text matches the given $selectable. Why should it, if autocompletion won't change the text?

Because there may be other data attached to the typeahead choice which is extracted by downstream logic listening for the event.

Instead of

      isValid = data && query !== data.val;
      if (isValid && !this.eventBus.before('autocomplete', data.obj, data.dataset)) {

it should be just

      if (data && !this.eventBus.before('autocomplete', data.obj, data.dataset)) {

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions