mark fallthrough as expected

This commit is contained in:
Robin Malfait
2020-09-29 15:52:54 +02:00
parent 279b021a2b
commit 7877632299
2 changed files with 2 additions and 0 deletions
@@ -397,6 +397,7 @@ const Items = forwardRefWithAs(function Items<
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// @ts-expect-error Falthrough is expected here
case Key.Space:
if (state.searchQuery !== '')
return dispatch({ type: ActionTypes.Search, value: event.key })
@@ -335,6 +335,7 @@ export const MenuItems = defineComponent({
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// @ts-expect-error Falthrough is expected here
case Key.Space:
if (api.searchQuery.value !== '') return api.search(event.key)
// When in type ahead mode, fallthrough