switch state when click on handle