diff --git a/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx b/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx index 5ec7e25..4914791 100644 --- a/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx +++ b/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx @@ -124,12 +124,7 @@ const CommandBarDialog: React.FC = ({ onDrag, open, toggl > -
+
{expanded.value && !result.value && } {result.value && }
diff --git a/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx b/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx index f58f5c8..a3ba2a3 100644 --- a/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx +++ b/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx @@ -17,18 +17,16 @@ const CommandBarFooter: React.FC = () => { commands, result, selectedCommandGroup, - expanded + expanded, }, - Icon + Icon, } = useCommandBarState(); const commandForContext = useComputed(() => { const commandId = activeCommandId.value ?? resultCommandId.value; if (!commandId) return null; // FIXME: This will not be correct when a command and an option in the result have the same id - return commandId - ? commands.value[commandId] ?? result.value.options[commandId] - : null; + return commandId ? commands.value[commandId] ?? result.value.options[commandId] : null; }); const isRunning = activeCommandId.value !== null; @@ -43,7 +41,8 @@ const CommandBarFooter: React.FC = () => { - {commandForContext.value.name}{activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''} + {commandForContext.value.name} + {activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''} ) : commandForContext.value ? (