Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MenuList] Convert to a function component (#14865)
* [MenuList] Convert to a function component * Provide access to MenuList internals via actions property * Changed Menu to interact with MenuList only via exposed actions * Adjusted Menu and MenuList tests accordingly * [MenuList] Fix MenuList test expected results to account for varying scrollbar size * scrollbar size is 0px with jsdom, but various sizes in Karma tests with different browsers * [MenuList] Address lint errors * Moved resetTabIndex out of the component so it doesn't need to be an effect dependency * Removed no-longer-used (due to moving functionality to MenuList) imports from Menu * [MenuList] Incorporate code review feedback * Deconstruct props in function body * Remove redundant findDOMNode calls * Document StrictMode status of findDOMNode calls * [MenuList] Fix Karma test for Safari (hopefully) * Unable to test this locally * [MenuList] Fix Karma test for Mac OS Chrome (hopefully) * Unable to test this locally * [MenuList] Use getScrollbarSize from utils instead of dom-helpers * [MenuList] Prettier * [MenuList] Fix Karma test for Chrome 41 (hopefully) * [MenuList] Fix Karma test for Chrome 41 * Stub clientHeight by stubbing the getter (stubbing the value does not work on Chrome 41) * [MenuList] Support ref using forwardRef * Change test to use ref instead of wrapper.getDOMNode() * [MenuList] Prettier test * [test] Remove wrapper.setProps calls for specifying onEnteringSpy * [MenuList] Make intent of condition clearer * [MenuList] Change useLayoutEffect to useEffect
- Loading branch information
1 parent
a2a3771
commit d1a7d76
Showing
5 changed files
with
286 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.