Option to call 'clear selection' automatically

Hi Team,

I have a table with server side pagination enabled. When user clicks on "select all" custom button

 tableName.selectRow(_.range(0, searchLinksTable.pageSize))

then first page data gets selected. Now if user moves to next page I see that in next page as well all rows are selected. Which gives user an impression that on select all selects all the data available in server. But in reality select all only selects a single page visible rows.

Now to remove this confusion I was to do "clear selection" if user is moving to another page. How can I trigger clear selection?

I can trigger below code to achieve same but is there any handy function already available?

tableName.selectRow(_.range(0, 0))