Skip to content

Commit

Permalink
mito-ai: remove duplicate ChatDropdown dom creation
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondr77 committed Nov 18, 2024
1 parent a56af77 commit 51632ec
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions mito-ai/src/Extensions/AiChat/ChatMessage/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ const ChatInput: React.FC<ChatInputProps> = ({

return (
<div style={{ position: 'relative' }}>
{isDropdownVisible && showDropdownAbove && (
<ChatDropdown
options={expandedVariables}
onSelect={handleOptionSelect}
filterText={dropdownFilter}
position="above"
/>
)}
<textarea
ref={textAreaRef}
className={classNames("message", "message-user", 'chat-input')}
Expand Down Expand Up @@ -192,12 +184,12 @@ const ChatInput: React.FC<ChatInputProps> = ({
<button onClick={onCancel}>Cancel</button>
</div>
}
{isDropdownVisible && !showDropdownAbove && (
{isDropdownVisible && (
<ChatDropdown
options={expandedVariables}
onSelect={handleOptionSelect}
filterText={dropdownFilter}
position="below"
position={showDropdownAbove ? "above" : "below"}
/>
)}
</div>
Expand Down

0 comments on commit 51632ec

Please sign in to comment.