Skip to content
Discussion options

You must be logged in to vote

In Fluent UI v2 Web Components, the Combobox component has deprecated the autocomplete="both" attribute, which previously provided native filtering of options based on user input. This change necessitates implementing custom filtering logic to achieve similar behavior.

To replicate the autocomplete functionality:

  1. Implement Custom Filtering: Attach an event listener to the input event of the Combobox. Within this handler, filter the available options based on the user's input and update the displayed options accordingly.

    Example:

    const combobox = document.querySelector('fluent-combobox');
    const allOptions = [...combobox.querySelectorAll('fluent-option')];
    
    combobox.addEventListener('input',

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by motss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants