pqSelect component is used in this example and max number of options/ columns displayed can be controlled with maxDisplay property.
//convert it into pqSelect.
$(".columnSelector").pqSelect({
checkbox: true,
multiplePlaceholder: 'Select visible columns',
maxDisplay: 10,
width: 'auto'
});
Also there is no reset columns
There is select All checkbox in pqSelect that can be used to show / hide all columns at once.