Select all rows on colum header click with checkbox

I have user core UI DataTable with React component and want to add the functionality of selected all checkbox rows on click of column header checkbox click. How can I achieve it?
In the screenshot attached below, I want to replace the select label from column 1 and put the checkbox and on click want to select all checkbox.