Skip to content

Commit

Permalink
pass references
Browse files Browse the repository at this point in the history
  • Loading branch information
silviuaavram committed Jul 25, 2024
1 parent 99667f9 commit 55ed297
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/hooks/useCombobox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ function useCombobox(userProps = {}) {
},
[dispatch, latest],
),
useMemo(() => [menuRef, toggleButtonRef, inputRef], []),
useMemo(
() => [menuRef, toggleButtonRef, inputRef],
[menuRef.current, toggleButtonRef.current, inputRef.current],
),
)
const setGetterPropCallInfo = useGetterPropsCalledChecker(
'getInputProps',
Expand Down
5 changes: 4 additions & 1 deletion src/hooks/useSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ function useSelect(userProps = {}) {
},
[dispatch, latest],
),
useMemo(() => [menuRef, toggleButtonRef], []),
useMemo(
() => [menuRef, toggleButtonRef],
[menuRef.current, toggleButtonRef.current],
),
)
const setGetterPropCallInfo = useGetterPropsCalledChecker(
'getMenuProps',
Expand Down

0 comments on commit 55ed297

Please sign in to comment.