Select-all button working

Select-all button now updates its state based on selected records in the
table. It also works as expected .. selecting or unselecting all records
when toggled manually