Skip to content

Commit

Permalink
fix: Enter Key Functionality in the Response Editor when @ symbol is … (
Browse files Browse the repository at this point in the history
#10699)

Co-authored-by: Smruti Ranjan Badatya <smrutiranjan@Smrutis-MacBook-Pro.local>
  • Loading branch information
iamsmruti and Smruti Ranjan Badatya authored Jan 23, 2025
1 parent 8b581f4 commit cd3506d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/client/components/MentionDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export default forwardRef(

const enterHandler = () => {
selectItem(selectedIndex)

if (items.length === 0) return false
return true
}

useEffect(() => setSelectedIndex(0), [items])
Expand All @@ -47,8 +50,7 @@ export default forwardRef(
}

if (event.key === 'Enter' || event.key === 'Tab') {
enterHandler()
return true
return enterHandler()
}
return false
}
Expand Down

0 comments on commit cd3506d

Please sign in to comment.