Add polling function.
Update the view when the input changes.