Skip to content

Commit ff932d0

Browse files
authored
Merge pull request #177 from csandman/menu-is-open-fix
Fix the `menuIsOpen` prop
2 parents c8a235a + 6e348a9 commit ff932d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/use-chakra-select-props.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ const useChakraSelectProps = <
4646
});
4747

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

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

0 commit comments

Comments
 (0)