Skip to content

enableSelection = false row is selectable when isSelected is set #5665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
htettwin opened this issue Sep 9, 2016 · 0 comments · Fixed by #6648
Closed

enableSelection = false row is selectable when isSelected is set #5665

htettwin opened this issue Sep 9, 2016 · 0 comments · Fixed by #6648

Comments

@htettwin
Copy link

htettwin commented Sep 9, 2016

I can de-select the disable row if the row is selected previously.

I have a set of data that are supposed to be selected. So I use scope.gridApi.selection.selectRow to select the rows. All of those selected rows must be disabled. So $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.ALL); is fired to update the enableSelection flag. The expected behavior is that the selection should not trigger at all for rows that have enableSelection false. However, as you can see in the plunker, I can de-select the row that is suppose to be disable (enableSelection=false).

Please see the plunker http://plnkr.co/edit/aCN5nYDtmJiz4CcCT0Vs?p=preview.

The issue is in 'toggleRowSelection' in selection.js. The expression is "row.enableSelection === false && !selected" instead of just "row.enableSelection === false"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant