Resort by title when the header is clicked.