Is list view table data retrieved server side page by page or added to dom?

I am working on a custom module and in the list view some of my columns are created on the fly, row by row. I’d like to be able to sort by those columns which I’m realizing will only be possible if all the table data is loaded into the dom first. If it makes a call to the server for each page then I am going to have to rethink my whole approach. Which way is it?