fix(loyalty): only show staff dropdown after typing, not on focus
The autocomplete dropdown appeared immediately when the name field gained focus (even when empty). Now only shows when there's text to filter by. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -135,7 +135,7 @@
|
||||
<div class="relative" x-data="{ open: false }" @click.outside="open = false">
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">{{ _('loyalty.shared.pins.pin_name') }}</label>
|
||||
<input type="text" x-model="staffSearch" required
|
||||
@focus="open = staffMembers.length > 0"
|
||||
@focus="open = staffSearch.length > 0 && staffMembers.length > 0"
|
||||
@input="open = staffMembers.length > 0; onStaffSearchInput()"
|
||||
autocomplete="off"
|
||||
class="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg focus:border-purple-400 focus:outline-none dark:bg-gray-700 dark:text-gray-300"
|
||||
@@ -204,7 +204,7 @@
|
||||
<div class="relative" x-data="{ open: false }" @click.outside="open = false">
|
||||
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">{{ _('loyalty.shared.pins.pin_name') }}</label>
|
||||
<input type="text" x-model="staffSearch" required
|
||||
@focus="open = staffMembers.length > 0"
|
||||
@focus="open = staffSearch.length > 0 && staffMembers.length > 0"
|
||||
@input="open = staffMembers.length > 0; onStaffSearchInput()"
|
||||
autocomplete="off"
|
||||
class="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg focus:border-purple-400 focus:outline-none dark:bg-gray-700 dark:text-gray-300"
|
||||
|
||||
Reference in New Issue
Block a user