primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Add rowSelectable property to DataTable

Open gregAnd opened this issue 8 years ago • 32 comments

[x ] bug report => Search github for a similar issue or PR before submitting

I am facing a problem on PrimeNG TurboTable.

I started from the following example: https://www.primefaces.org/primeng/#/table/selection and more particularly from the Checkbox Selection example.

The only difference is that on some p-tableCheckbox I added a [disabled]="true"

<p-tableCheckbox [value]="rowData" [disabled]="rowData.color==='orange'">

disabled checkbox

This works very well if I select a disabled line it does not activate and can not be selected, but when I click on p-tableHeaderCheckbox all the lines are selected even the lines in disabled.

all selected

In addition, the selection also counts the lines in status disabled or it should only take lines with no status disabled I made an example on stackblitz : https://stackblitz.com/edit/angular-gnbsml?file=src%2Fapp%2Fapp.component.html

How to prevent tableHeaderCheckbox from also selecting disable lines?

Thank you in advance for your answers

gregAnd avatar Oct 23 '18 12:10 gregAnd

This issue persists in 7.0 and would help my users greatly if fixed please!

bomberblue07 avatar Nov 29 '18 20:11 bomberblue07

+1 Please add this. It would be a great addition. We can have additional configuration options, something like this <p-table [selectDisabledRows]="true/false"></p-table> to indicate <p-tableHeaderCheckbox></p-tableHeaderCheckbox> not to select disabled rows.

@Merve7

ausshadu avatar Dec 06 '18 18:12 ausshadu

+1

francovegini avatar Apr 29 '19 12:04 francovegini

+1

falexandre avatar Apr 29 '19 12:04 falexandre

+1

jlwollinger-zz avatar Apr 29 '19 12:04 jlwollinger-zz

+1

ghost avatar Apr 29 '19 12:04 ghost

+1

andersonbuzzi avatar Apr 29 '19 13:04 andersonbuzzi

+1

sidneibiz avatar Apr 29 '19 13:04 sidneibiz

+1

marcoshevaristo avatar Apr 29 '19 13:04 marcoshevaristo

+1

maxonweb avatar Jun 07 '19 04:06 maxonweb

+1

HieuTrinh83 avatar Jul 25 '19 10:07 HieuTrinh83

+1

grozdanova avatar Aug 23 '19 08:08 grozdanova

+1

yelhouti avatar Aug 29 '19 04:08 yelhouti

A PR has been made to fix this, in the meantime it's available here: https://github.com/yelhouti/primeng/releases/download/8.0.2/primeng-8.0.3-SNAPSHOT.tgz

yelhouti avatar Aug 30 '19 01:08 yelhouti

Hi guys, can you please tell is there date when PR from @yelhouti plan to be merged?

kramar avatar Oct 29 '19 14:10 kramar

@kramar they are not planning to merge it, looking for a better alternative

yelhouti avatar Oct 29 '19 14:10 yelhouti

@yelhouti Got it, thank you.

kramar avatar Oct 29 '19 14:10 kramar

Any updates on this issue? I haven't been able to find a workaround and this is severely affecting our user experience when we use the <p-table>.

tytusplanck avatar Dec 05 '19 16:12 tytusplanck

The setting "pSelectableRowDisabled" should also be taken into account.

morula avatar Dec 09 '19 08:12 morula

any updates on this issue?

jyoti1904 avatar Jan 02 '20 20:01 jyoti1904