Skip to content

[Autocomplete] Don't want a clear button #379

Open
@maartendekeizer

Description

@maartendekeizer

A clear button is automaticly added when the autocomplete is not disabled and not multiple:

        if (!this.formElement.disabled && !isMultiple) {
            plugins.clear_button = { title: '' };
        }

How can we always disable the clear_button plugin?

Already tried, but that will result in a error

{{ stimulus_controller('symfony/ux-autocomplete/autocomplete', {tom_select_options: {maxItems: 1, plugins: {clear_button: null}}})}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions