Reset allSelected flag when data is changed and add event to clear selection