Jason Beggs 2 年之前
父节点
当前提交
09b59c4b55
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      index.html
  2. 1 1
      packages/ui/src/combobox.js

+ 1 - 1
index.html

@@ -249,7 +249,7 @@
                                             </svg>
                                         </span>
                                     </template>
-                                    <input x-combobox:input @change="query = $event.target.value" @focus="query = ''" class="border-none p-0 focus:ring-0" placeholder="Search..." />
+                                    <input x-combobox:input @change="query = $event.target.value" class="border-none p-0 focus:ring-0" placeholder="Search..." />
                                 </span>
                                 <button x-combobox:button class="absolute inset-y-0 right-0 flex items-center pr-2">
                                     <svg class="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="none" stroke="currentColor">

+ 1 - 1
packages/ui/src/combobox.js

@@ -442,8 +442,8 @@ function handleOption(el, Alpine) {
             this.$data.__selectOption(el)
 
             if (! this.$data.__isMultiple) {
-                this.$data.__close()
                 this.$data.__resetInput()
+                this.$data.__close()
             }
 
             this.$nextTick(() => this.$refs.__input.focus({ preventScroll: true }))