Skip to content

Commit

Permalink
Fix the menuIsOpen prop
Browse files Browse the repository at this point in the history
  • Loading branch information
csandman committed Sep 9, 2022
1 parent c8a235a commit 6e348a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/use-chakra-select-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const useChakraSelectProps = <
});

// Unless `menuIsOpen` is controlled, disable it if the select is readonly
const realMenuIsOpen = menuIsOpen ?? inputProps.readOnly ? false : undefined;
const realMenuIsOpen =
menuIsOpen ?? (inputProps.readOnly ? false : undefined);

/** Ensure that the size used is one of the options, either `sm`, `md`, or `lg` */
let realSize: Size = size;
Expand Down

0 comments on commit 6e348a9

Please sign in to comment.