Skip to content

Commit

Permalink
fix: Report fields - App crashes when disabling/enabling list values …
Browse files Browse the repository at this point in the history
…via checkbox & dropdown button.

Signed-off-by: krishna2323 <[email protected]>
  • Loading branch information
Krishna2323 committed Aug 12, 2024
1 parent fe091c7 commit a43e886
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/ButtonWithDropdownMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,15 @@ function ButtonWithDropdownMenu<IValueType>({
useKeyboardShortcut(
CONST.KEYBOARD_SHORTCUTS.CTRL_ENTER,
(e) => {
onPress(e, selectedItem.value);
if (shouldAlwaysShowDropdownMenu || options.length) {
if (!isSplitButton) {
setIsMenuVisible(!isMenuVisible);
return;
}
onPress(e, selectedItem?.value);
} else {
onPress(e, options[0]?.value);
}
},
{
captureOnInputs: true,
Expand Down

0 comments on commit a43e886

Please sign in to comment.