switch buttons on component change