react-component / react-component/menu

Uncaught TypeError: onItemHover is not a function

Open
#142 11 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
701
Forks
266
Avg merge
4d 11h
Merged PRs (30d)
3

Description

Hi There, I'm running into a console error on a vertical menu where when I do a mouseover. Note that I have a horizontal menu on the same page (with a dropdown) that's not throwing this error.

Here's the console error:
Uncaught TypeError: onItemHover is not a function
at MenuItem._this.onMouseEnter (MenuItem.js:54)
at HTMLUnknownElement.callCallback (react-dom.development.js:100)
at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
at Object.invokeGuardedCallback (react-dom.development.js:187)
at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:201)
at executeDispatch (react-dom.development.js:466)
at executeDispatchesInOrder (react-dom.development.js:488)
at executeDispatchesAndRelease (react-dom.development.js:586)
at executeDispatchesAndReleaseTopLevel (react-dom.development.js:597)
at Array.forEach ()
at forEachAccumulated (react-dom.development.js:565)
at runEventsInBatch (react-dom.development.js:728)
at runExtractedEventsInBatch (react-dom.development.js:737)
at handleTopLevel (react-dom.development.js:4201)
at batchedUpdates (react-dom.development.js:12537)
at batchedUpdates (react-dom.development.js:1939)
at dispatchEvent (react-dom.development.js:4282)

Here's the code:

<Menu >
<MenuItem key={props.props.groupId+'-create-event'}><Link to={props.props.rootUri + "/create-event"}>Create Event</Link></MenuItem>
</Menu>

All the props variables are valid.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the vertical-menu hover error and inspect MenuItem.js at line 54, then compare the vertical and horizontal menu usage described in the report. Determine why onItemHover is not callable in the vertical case; done means hovering the vertical item no longer throws the reported TypeError while the horizontal menu still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.