update back input after clicking to a list element