Support for custom closeMenu hook