Skip to content

Can AutocompleteWidget be disabled in client code? #96

@mscheper

Description

@mscheper

In addition to HTMX, I use AlpineJS in my client code.

By coding my own fix for #95 (at least temporarily), I've added an x-bind:disabled attribute to an AutocompleteWidget, which tells AlpineJS to bind the disabled attribute to a JavaScript variable. However, when the disabled attribute is added in this dynamic way, the field doesn't actually get disabled, and when the disabled attribute is removed and the user types some text, the x-bind attribute disappears.

I note that, if the widget is disabled initially, it is rendered by the server code as an <output> tag. Is AlpineJS compatibility beyond the scope of this project? It seems AlpineJS and HTMX are commonly used together, so that would be unfortunate.

Thanks!

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