update component: add custom event handler