mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-19 01:50:51 -05:00
fix(sidebar): highlight search tab while the search command menu is open (#14935)
This commit is contained in:
1 parent
711a0479f1
commit
0cf0cdc09c
2 files changed
+5
-5
No files matched your search
@@ -619,8 +619,8 @@ export default function AppSidebar() {
|
||||
</SidebarTab>
|
||||
</div>
|
||||
<ChatSearchCommandMenu
|
||||
trigger={(open) => (
|
||||
<SidebarTab icon={SvgSearchMenu} onClick={open}>
|
||||
trigger={(open, isOpen) => (
|
||||
<SidebarTab icon={SvgSearchMenu} selected={isOpen} onClick={open}>
|
||||
{t("appSidebar.searchChats.label")}
|
||||
</SidebarTab>
|
||||
)}
|
||||
|
||||
@@ -54,8 +54,8 @@ function DynamicFooter() {
|
||||
}
|
||||
|
||||
interface ChatSearchCommandMenuProps {
|
||||
/** Renders the control that opens the menu. */
|
||||
trigger: (open: () => void) => React.ReactNode;
|
||||
/** Renders the control that opens the menu. `isOpen` lets it show a selected state. */
|
||||
trigger: (open: () => void, isOpen: boolean) => React.ReactNode;
|
||||
}
|
||||
|
||||
interface FilterableProject {
|
||||
@@ -211,7 +211,7 @@ export default function ChatSearchCommandMenu({
|
||||
|
||||
return (
|
||||
<>
|
||||
{trigger(handleOpen)}
|
||||
{trigger(handleOpen, open)}
|
||||
|
||||
<CommandMenu open={open} onOpenChange={handleOpenChange}>
|
||||
<CommandMenu.Content>
|
||||
|
||||
Reference in new issue
Block a user