reload data when changing viewType