fkhadra / fkhadra/react-contexify
Menu No longer closing on click or off click
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
**What is the current behavior?**
Presently the context menu is persisting once opened and is is no longer closing when an item is clicked or the user scrolls/left clicks away per previous versions.
```
import React, {Component} from 'react';
import {contextMenu, Menu} from 'react-contexify';
class Container extends Component {
constructor(props) {
super(props);
}
handleEvent = e => {
contextMenu.show({
id: "menu_id",
event: e,
props: {
x: 1000,
y: 1000,
target: null
}
});
};
render() {
return
{/* Sample menu*/}
}
}
export default Container
```
**What is the expected behavior?**
The menu to close when left click, scroll or an item is selected
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
Latest Chrome, React 17.0.1, v5 contexify. Working if reverting back to contexify 4.1.1
Contributor guide
Assessment
This issue has not been assessed yet.