Skip to content

flux:menu.checkbox doesn't show checked state when disabled #2344

@scottcnx

Description

@scottcnx

Flux version

v2.9.0

Livewire version

v4.0

Tailwind version

4.0.7

Browser and Operating System

Chrome and Safari on macOS

What is the problem?

When a flux:menu.checkbox component has both :checked="true" and :disabled="true" attributes set, the checkbox appears disabled but doesn't display the checked state visually.

Use Case

I'm building a table column visibility/ordering feature where certain columns are "locked" (always visible and non-reorderable). I want to show these columns as checked and disabled in the dropdown menu so users understand they're always visible but cannot be toggled off.

Code snippets to replicate the problem

<flux:menu keep-open>
    {{-- This appears unchecked (bug) --}}
    <flux:menu.checkbox :checked="true" :disabled="true">
        Always Visible Column (Locked)
    </flux:menu.checkbox>
    
    {{-- This works as expected --}}
    <flux:menu.checkbox :checked="true">
        Regular Column
    </flux:menu.checkbox>
</flux:menu>

Screenshots/ screen recordings of the problem

Image

How do you expect it to work?

A disabled flux:menu.checkbox should visually display its checked state when :checked="true" is set, similar to how a native HTML checkbox behaves:

<!-- Native HTML behavior -->
<input type="checkbox" checked disabled> <!-- Shows as checked AND disabled -->

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.

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