Skip to content

Commit

Permalink
fix: format check
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkyrylo committed Sep 17, 2024
1 parent 64170d4 commit 193b2c3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 63 deletions.
124 changes: 62 additions & 62 deletions components/lib/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion components/lib/multiselect/MultiSelectPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export const MultiSelectPanel = React.memo(
onEnter,
onEntered,
onExit: props.onExit,
onExited: props.onExited,
onExited: props.onExited
},
getPTOptions('transition')
);
Expand Down

0 comments on commit 193b2c3

Please sign in to comment.