From 193b2c34469fa945fb2ac63948c82dd34d3e9c09 Mon Sep 17 00:00:00 2001 From: Kyrylo Hrishchenko Date: Tue, 17 Sep 2024 19:16:54 +0300 Subject: [PATCH] fix: format check --- components/lib/multiselect/MultiSelect.js | 124 +++++++++--------- .../lib/multiselect/MultiSelectPanel.js | 2 +- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/components/lib/multiselect/MultiSelect.js b/components/lib/multiselect/MultiSelect.js index 0b1c02e981..3cb367866e 100644 --- a/components/lib/multiselect/MultiSelect.js +++ b/components/lib/multiselect/MultiSelect.js @@ -285,93 +285,93 @@ export const MultiSelect = React.memo( const metaKey = event.metaKey || event.ctrlKey; switch (event.code) { - case 'ArrowUp': - if (props.inline) { - break; - } - - onArrowUpKey(event); - break; + case 'ArrowUp': + if (props.inline) { + break; + } - case 'ArrowDown': - if (props.inline) { + onArrowUpKey(event); break; - } - onArrowDownKey(event); + case 'ArrowDown': + if (props.inline) { + break; + } - break; + onArrowDownKey(event); - case 'Space': - case 'NumpadEnter': - case 'Enter': - if (props.inline) { break; - } - onEnterKey(event); - break; + case 'Space': + case 'NumpadEnter': + case 'Enter': + if (props.inline) { + break; + } - case 'Home': - if (props.inline) { + onEnterKey(event); break; - } - onHomeKey(event); - event.preventDefault(); - break; + case 'Home': + if (props.inline) { + break; + } - case 'End': - if (props.inline) { + onHomeKey(event); + event.preventDefault(); break; - } - onEndKey(event); - event.preventDefault(); - break; + case 'End': + if (props.inline) { + break; + } - case 'PageDown': - onPageDownKey(event); - break; + onEndKey(event); + event.preventDefault(); + break; - case 'PageUp': - onPageUpKey(event); - break; + case 'PageDown': + onPageDownKey(event); + break; - case 'Escape': - if (props.inline) { + case 'PageUp': + onPageUpKey(event); break; - } - hide(); - break; + case 'Escape': + if (props.inline) { + break; + } - case 'Tab': - onTabKey(event); - break; + hide(); + break; - case 'ShiftLeft': - case 'ShiftRight': - onShiftKey(event); - break; + case 'Tab': + onTabKey(event); + break; - default: - if (event.code === 'KeyA' && metaKey) { - const value = visibleOptions.filter((option) => isValidOption(option)).map((option) => getOptionValue(option)); + case 'ShiftLeft': + case 'ShiftRight': + onShiftKey(event); + break; - updateModel(event, value, value); + default: + if (event.code === 'KeyA' && metaKey) { + const value = visibleOptions.filter((option) => isValidOption(option)).map((option) => getOptionValue(option)); - event.preventDefault(); - break; - } + updateModel(event, value, value); - if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) { - !overlayVisibleState && show(); - searchOptions(event); - event.preventDefault(); - } + event.preventDefault(); + break; + } + + if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) { + !overlayVisibleState && show(); + searchOptions(event); + event.preventDefault(); + } - break; + break; } setClicked(false); diff --git a/components/lib/multiselect/MultiSelectPanel.js b/components/lib/multiselect/MultiSelectPanel.js index 24d9f9b06f..a0da4f4206 100644 --- a/components/lib/multiselect/MultiSelectPanel.js +++ b/components/lib/multiselect/MultiSelectPanel.js @@ -326,7 +326,7 @@ export const MultiSelectPanel = React.memo( onEnter, onEntered, onExit: props.onExit, - onExited: props.onExited, + onExited: props.onExited }, getPTOptions('transition') );