mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
fix: persistent search
This commit is contained in:
1 parent
7391937070
commit
5bcfa88f48
1 file changed
+2
@@ -15,6 +15,7 @@ interface SearchBarProps {
|
||||
|
||||
export function SearchBar({ topResult, onSelect }: SearchBarProps) {
|
||||
const tankFiltersStore = TankFilters.useStore();
|
||||
const lastSearch = tankFiltersStore.getState().search;
|
||||
const router = useRouter();
|
||||
const input = useRef<HTMLInputElement>(null);
|
||||
const searching = TankFilters.use((state) => state.searching);
|
||||
@@ -58,6 +59,7 @@ export function SearchBar({ topResult, onSelect }: SearchBarProps) {
|
||||
<Flex justify="center" mt="4">
|
||||
<Flex gap="2" flexGrow="1">
|
||||
<TextField.Root
|
||||
defaultValue={lastSearch}
|
||||
style={{ flex: 1 }}
|
||||
ref={input}
|
||||
placeholder="Search tanks..."
|
||||
|
||||
Reference in new issue
Block a user