Toggle item state on line click