mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
chore: reset palette state
This commit is contained in:
@@ -149,6 +149,13 @@ export function RealCommandPalette() {
|
|||||||
[bounce, setOpen],
|
[bounce, setOpen],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (!open) {
|
||||||
|
setInputValue("")
|
||||||
|
setActivePage("home")
|
||||||
|
}
|
||||||
|
}, [open, setActivePage, setInputValue])
|
||||||
|
|
||||||
const filteredCommands = React.useMemo(
|
const filteredCommands = React.useMemo(
|
||||||
() => getFilteredCommands(),
|
() => getFilteredCommands(),
|
||||||
[getFilteredCommands],
|
[getFilteredCommands],
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import {
|
import { useAccountOrGuest, useCoState } from "@/lib/providers/jazz-provider"
|
||||||
useAccount,
|
|
||||||
useAccountOrGuest,
|
|
||||||
useCoState,
|
|
||||||
} from "@/lib/providers/jazz-provider"
|
|
||||||
import { LaIcon } from "@/components/custom/la-icon"
|
import { LaIcon } from "@/components/custom/la-icon"
|
||||||
import { Topic, PersonalLink, PersonalPage } from "@/lib/schema"
|
import { Topic, PersonalLink, PersonalPage } from "@/lib/schema"
|
||||||
import { PublicGlobalGroup } from "@/lib/schema/master/public-group"
|
import { PublicGlobalGroup } from "@/lib/schema/master/public-group"
|
||||||
|
|||||||
@@ -239,12 +239,13 @@ export const useLaEditor = ({
|
|||||||
...props,
|
...props,
|
||||||
}),
|
}),
|
||||||
[
|
[
|
||||||
|
me,
|
||||||
placeholder,
|
placeholder,
|
||||||
mergedEditorProps,
|
mergedEditorProps,
|
||||||
|
props,
|
||||||
throttledSetValue,
|
throttledSetValue,
|
||||||
handleCreate,
|
handleCreate,
|
||||||
handleBlur,
|
handleBlur,
|
||||||
props,
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export function useThrottleCallback<T extends AnyFunction>(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
[delay, ...deps],
|
[delay, ...deps],
|
||||||
) as T
|
) as T
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user