Remove component on close button click