Skip to content

Expose Internal Methods and Properties #390

Open
@cjkoepke

Description

@cjkoepke

I've hit an issue where I need to programmatically control other Autocomplete instances on the same page, but (at least from my understanding) this is impossible.

Having an initiation function like this, is great:

autocomplete({
  element: document.querySelector( '' ),
  source: [ 'option', 'option-1', 'options-2']
})

But there is no way to reference this input after it initiates. How hard would it be to have this return the input instance? i.e.

const input = autocomplete({
  element: document.querySelector( '' ),
  source: [ 'option', 'option-1', 'options-2']
})

// Later
input.hide();

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestUser requests a new feature🕔 daysA few unknowns, but we roughly know what’s involved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions