Keep sorted data when changing page size or pagination