Add support for an onHide action