The Click-Away Listener component detects when a click event happens outside of its child element.
Please refer to the Click-Away Listener component page in the BaseĀ UI docs for demos and details on usage.
Click-Away Listener is a part of the standalone BaseĀ UI component library. It is currently re-exported from
@mui/material
for your convenience, but it will be removed from this package in a future major version after BaseĀ UI gets a stable release.