Skip to content

Ability to add data to the label that is not searchable #17249

@daviegravy

Description

@daviegravy

We have been working with your autocomplete library for quite some time now and we love it, but our need to include stylings in the label has grown to maintain consistency with the use of icons and stylings from our framework.

Is there a way to include text (preferably markup) that could be rendered to the list output but not searched upon? We've tried a multitude of hacky methods that have all failed us. String replacements, HTML entities, etc. all end up either not be rendered or still being searchable.

We want to be able to include icons from FontAwesome in the label as well as HTML markup tags to help facilitate the styling of the autocomplete list. Naturally, we thought about adding an additional parameter to the data components and call it display_label which would be used strictly for the render and still allow the label to searched upon but we wanted to see if you had a more cohesive or natural method since I suspect this would dork up the marking feature. At least for us, the marking is not necessary if we could score a win with non-searchable characters in the label.

Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions