Close context menu on escape keypress

This commit is contained in:
Andrew Kingston 2023-05-26 10:43:25 +01:00
parent 852df16448
commit 25f469dc28
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@
dispatch, dispatch,
selectedRows, selectedRows,
config, config,
menu,
} = getContext("grid") } = getContext("grid")
const ignoredOriginSelectors = [ const ignoredOriginSelectors = [
@ -61,6 +62,7 @@
} else { } else {
$focusedCellId = null $focusedCellId = null
} }
menu.actions.close()
return return
} else if (e.key === "Tab") { } else if (e.key === "Tab") {
e.preventDefault() e.preventDefault()