Skip to content

change dropdown open trigger from click to hover , right click etc... #1369

Discussion options

You must be logged in to vote

@codemountain You could start with something like this:

<?php

use Livewire\Volt\Component;

new class extends Component {
    public bool $open = false;
}; ?>

<div>
    <flux:dropdown wire:model="open" x-on:mouseover="$wire.open = true" x-on:mouseout="$wire.open = false">
        <flux:button icon-trailing="chevron-down">Sort by</flux:button>

        <flux:menu>
            <flux:menu.radio.group wire:model="sortBy">
                <flux:menu.radio checked>Latest activity</flux:menu.radio>
                <flux:menu.radio>Date created</flux:menu.radio>
                <flux:menu.radio>Most popular</flux:menu.radio>
            </flux:menu.radio.group>
        </flux:menu>
    </flux:d…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by codemountain
Comment options

You must be logged in to vote
1 reply
@jeffchown
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants