You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a MenuItem is nested inside a MenuSection the Menu components prop onClose is not called when MenuItem fires onClick event.
Steps to reproduce the bug
it('has called onClose when MenuItem is clicked',()=>{consthandleOnClose=jest.fn()consthandleOnClick=jest.fn()render(<MenuopenonClose={handleOnClose}><MenuSectiontitle="test"><MenuItemonClick={handleOnClick}>Item 1</MenuItem></MenuSection></Menu>,)constmenuItem=screen.getByText('Item 1')fireEvent.click(menuItem)expect(handleOnClick).toHaveBeenCalled()expect(handleOnClose).toHaveBeenCalled()})
Expected behavior
Expect handleOnClose to have been called, but it's not.
Specifications
Version: equinor/eds-core-react v0.6.0
Browser: Chrome 85.0.4183.83
OS: Windows 10
The text was updated successfully, but these errors were encountered:
Describe the bug
When a MenuItem is nested inside a MenuSection the Menu components prop onClose is not called when MenuItem fires onClick event.
Steps to reproduce the bug
Expected behavior
Expect handleOnClose to have been called, but it's not.
Specifications
The text was updated successfully, but these errors were encountered: