mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-05 22:53:52 +01:00
fix(CommandPalette): put back cursor on top only when query changes
This commit is contained in:
@@ -183,7 +183,7 @@ const groups = computed(() => map(groupBy(results.value, command => command.item
|
|||||||
} as Group
|
} as Group
|
||||||
}))
|
}))
|
||||||
|
|
||||||
watch(groups, () => {
|
watch(query, () => {
|
||||||
// Select first item on search changes
|
// Select first item on search changes
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// https://github.com/tailwindlabs/headlessui/blob/6fa6074cd5d3a96f78a2d965392aa44101f5eede/packages/%40headlessui-vue/src/components/combobox/combobox.ts#L804
|
// https://github.com/tailwindlabs/headlessui/blob/6fa6074cd5d3a96f78a2d965392aa44101f5eede/packages/%40headlessui-vue/src/components/combobox/combobox.ts#L804
|
||||||
|
|||||||
Reference in New Issue
Block a user