Skip to content

Commit bb0ca30

Browse files
authored
feat: search textbox is now draggable (#2737)
1 parent f9eb818 commit bb0ca30

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

assets/components/Search.vue

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<template>
22
<transition name="slide">
3-
<div class="fixed right-4 top-2 z-10 flex items-center" v-show="showSearch" v-if="search">
3+
<div
4+
class="fixed z-10 flex w-full justify-end p-2"
5+
v-show="showSearch"
6+
v-if="search"
7+
ref="container"
8+
:style="style"
9+
>
410
<div class="input input-primary flex h-auto items-center !shadow-lg">
511
<mdi:magnify />
612
<input
@@ -19,8 +25,11 @@
1925

2026
<script lang="ts" setup>
2127
const input = ref<HTMLInputElement>();
28+
const container = ref<HTMLDivElement>();
2229
const { searchFilter, showSearch, resetSearch } = useSearchFilter();
2330
31+
const { style } = useDraggable(container);
32+
2433
onKeyStroke("f", (e) => {
2534
if (e.ctrlKey || e.metaKey) {
2635
showSearch.value = true;

0 commit comments

Comments
 (0)