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

release auto-complete-element@1.0.0 #28

Merged
merged 1 commit into from Nov 24, 2022

Conversation

abeidahmed
Copy link
Collaborator

Added

  • Fetch options remotely with the src attribute

    <auto-complete for="users" multiple src="/users">
      <input type="text" class="form-control" />
      <ul id="users" hidden></ul>
    </auto-complete>

    This makes a request to /users?q=query endpoint with query being the search term. Search param can be changed by
    setting a param attribute on the auto-complete element

  • Users can update or watch for value attribute changes. Single-select auto-complete element sets a stringified object
    whereas multi-select sets a stringified array of objects

    <auto-complete value='{ "id": "1", "value": "Some value" }'>
      <!-- markup -->
    </auto-complete>
  • Support for initially selected options

    • Single

      <auto-complete value='{ "id": "1", "value": "Some value" }'>
        <!-- markup -->
      </auto-complete>
    • Multiple

      <auto-complete multiple value='[{ "id": "1", "value": "Some value" }, { "id": "2", "value": "Another value" }]'>
        <!-- markup -->
      </auto-complete>

Changed

  • Renamed auto-complete:selected event to auto-complete:commit
  • Renamed auto-complete:reset event to auto-complete:clear
  • Renamed data-autocomplete-reset attribute to data-autocomplete-clear

@abeidahmed abeidahmed merged commit 333c540 into main Nov 24, 2022
@abeidahmed abeidahmed deleted the custom-elements/auto-complete-element@1.0.0 branch February 28, 2023 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant