ISSUE-838 Keyboard navigation: people search + enter should not open create modal (#839)
This commit is contained in:
@@ -183,7 +183,7 @@ export const PeopleSearch: React.FC<PeopleSearchProps> = ({
|
|||||||
const handleEnterKey = (
|
const handleEnterKey = (
|
||||||
e: React.KeyboardEvent<HTMLInputElement>
|
e: React.KeyboardEvent<HTMLInputElement>
|
||||||
): void => {
|
): void => {
|
||||||
if (e.key === 'Enter' && onToggleEventPreview) {
|
if (e.key === 'Enter' && onToggleEventPreview && !isOpen) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
onToggleEventPreview()
|
onToggleEventPreview()
|
||||||
}
|
}
|
||||||
@@ -246,7 +246,8 @@ export const PeopleSearch: React.FC<PeopleSearchProps> = ({
|
|||||||
onToggleEventPreview,
|
onToggleEventPreview,
|
||||||
loading,
|
loading,
|
||||||
searchPlaceholder,
|
searchPlaceholder,
|
||||||
handlePaste
|
handlePaste,
|
||||||
|
isOpen
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user