Keep pace with the value when ok button clicked.