Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoguenet committed Mar 9, 2024
1 parent fb2655f commit 55afa15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/components/nudge-search.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
])

<div class="flex-1 px-4 flex items-center justify-center">
<div x-data="dropdownSearch({{ Js::from($nudges) }})" x-init="$watch('query', () => selectedNudgeIndex='')" class="relative w-full">
<div x-data="dropdownSearch({{ Js::from($nudges) }})" x-init="$watch('query', () => selectedNudgeIndex=null)" class="relative w-full">
<input x-model="query" x-on:click.outside="reset()" x-on:keyup.escape="reset()" x-on:keyup.down="selectNextNudge" x-on:keyup.up="selectPreviousNudge" x-on:keyup.enter="goToUrl()" id="combobox" type="text" class="w-full rounded-md border-0 bg-white py-1.5 pl-3 pr-12 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-green-400 sm:text-sm sm:leading-6" role="combobox" aria-controls="options" aria-expanded="false">
<button type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 text-gray-400">
Expand All @@ -21,7 +21,7 @@
<li class="relative cursor-pointer select-none py-2 pl-3 pr-9 text-gray-900" :class="{ 'font-semibold bg-gray-100 outline-none': index === selectedNudgeIndex }" id="option-0" role="option" tabindex="-1" x-on:click.prevent="goToUrl(nudge)">
<span x-text="nudge.title" class="block truncate" :class="{ 'font-semibold': index === selectedNudgeIndex }"></span>

<span x-text="nudge.user.name" class="sm:hidden xs:block md:block absolute inset-y-2 right-0 flex items-center pr-4 text-gray-400"></span>
<span x-text="nudge.user.name" class="hidden md:block absolute inset-y-2 right-0 flex items-center pr-4 text-gray-400"></span>
</li>
</template>
</ul>
Expand Down
2 changes: 2 additions & 0 deletions tests/Http/Nudge/OrderByTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

it('can search')->todo();

it('can see nudges displayed and sorted properly', function () {
// test('can see posts sorted by title', function (string $direction) {
// $posts = Post::factory(3)
Expand Down

0 comments on commit 55afa15

Please sign in to comment.