Is there a way to get rid of the select all checkbox on the PrimeFaces SelectCheckboxMenu?

Viewed 53

In my project, I am using the PrimeFaces selectCheckboxMenu component. At the top of the component, there is a checkbox that selects all of the items in the menu.

I have indicated the checkbox here:

enter image description here

For my use case, this box does not make sense to have present. There is a very large number of items in the menu. I have implemented a check that will not let the user carry out processing on the data if more than a certain number are selected. This number is much less than the number of items in the menu.

Does anyone know if there is any way that I could remove this checkbox from the menu? I have checked the documentation and I do not see anything that would tell me there is a way.

1 Answers

Yes just add this CSS to your application to remove that checkbox:

body .ui-selectcheckboxmenu-header .ui-chkbox {
  display:none;
}
Related