Skip to content

Menu trigger disabled can't be toggled after mount #59

Description

@jessejanderson

I have a "Bulk actions" menu that should enable once the user checks some table rows, but it stays disabled forever (toggling the other direction doesn't apply either).

<.menu disabled={...}> renders correctly, but changing it later from the server does nothing.

Seems to be because the trigger's disabled-related attrs (disabled, aria-disabled, data-disabled, tabindex) are all in the trigger's ignored attrs, and nothing on the client re-reads them — so a LiveView patch that changes disabled is silently dropped.

I'm currently working around it by rendering a plain disabled when disabled and swapping in the real menu when it flips. Works fine, but the documented disabled attr feels like it should keep working after mount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions