Skip to content

Commit

Permalink
Merge pull request #177 from csandman/menu-is-open-fix
Browse files Browse the repository at this point in the history
Fix the `menuIsOpen` prop
  • Loading branch information
csandman committed Sep 9, 2022
2 parents c8a235a + 6e348a9 commit ff932d0
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 ff932d0

Please sign in to comment.