Page 1 of 1

Dynamically disable checkboxes in DataTable

Posted: 15 May 2020, 22:36
by llange
Hello,

How can I enable/disable the checkboxes of the selection column (selectionMode="multiple") ?

It seems this question has already been asked - for other frameworks: I'm interested in a PrimeVue approach.

Thanks for any hint !

Re: Dynamically disable checkboxes in DataTable

Posted: 17 May 2020, 16:37
by cagatay.civici
Created an enhancement ticket;

https://github.com/primefaces/primevue/issues/324

Currently there is no way however in case it is urgent, one quick solution is implementing your own checkboxes with table templating, that would be easier since you'll have full control over the checkbox which offers disabled property.

Re: Dynamically disable checkboxes in DataTable

Posted: 17 May 2020, 22:07
by llange
Hi Cagatay,

Thanks for the answer, and the enhancement ticket.

I tried to do it with table templating and checkboxes (both the standard checkboxes and the datatable rowcheckboxes), unfortunately I'm so new to both vue and PrimeVue that I couldn't find a simple way to bind the checked state of the checkboxes with the rest of the Datatable.
One day I'll be able to do it, but for the moment I'm still experimenting...

So no, it's not urgent (I'm prototyping and learning at the same time) - and I can wait.

By the way, it's not completely unrelated, but I had some issue with DataTable + Checkboxes + Edit mode - described here : https://github.com/primefaces/primevue/issues/315 . If you have some time to look at it and tell me if it's expected or not. Thanks.

Re: Dynamically disable checkboxes in DataTable

Posted: 04 Jul 2020, 10:11
by cagatay.civici
Sure, we're reviewing the tickets at github these days as 2.0.0 is almost ready.