Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit a00a955

Browse files
committed
change how option is selected
1 parent d6d29d0 commit a00a955

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

resources/views/components/inputs/custom-select-option.blade.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<li @unless ($disabled || $isGroup)
2-
x-on:mouseenter="onMouseEnter($event.currentTarget.dataset.value)"
2+
x-on:mouseenter="onMouseEnter({{ $optionValue() }})"
33
x-on:mouseleave="selected = null; currentIndex = -1"
4-
x-on:click="choose($event.currentTarget.dataset.value, $event)"
4+
x-on:click="choose({{ $optionValue() }}, $event)"
55
@endunless
66

77
@unless ($isGroup)
88
role="option"
99
x-bind:class="{ 'focused': selected === {{ $optionValue() }}, 'selected': isChosen({{ $optionValue() }}) }"
1010
data-option="{{ json_encode($option) }}"
11-
data-value="{{ $option['value'] }}"
1211
x-bind:aria-selected="JSON.stringify(isChosen({{ $optionValue() }}))"
1312
@endunless
1413

0 commit comments

Comments
 (0)