-
Notifications
You must be signed in to change notification settings - Fork 34
indeterminate selection option for Tree table template #60
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
Comments
<ng-template #rowCheckboxTemplate let-row="row">
<span class="{{'dt-' + table.settings.selectionMode}}">
<input [type]="table.settings.selectionMode"
[checked]="table.selection.isSelected(this.row.$$index)"
[indeterminate]="partiallySelectedRow(row)"
(click)="onCheckboxClick(row)"/>
</span>
</ng-template>
getDescendants(row: Row) {
const results = [];
for (let i = row.$$index + 1; i < this.rows.length && row.$$level < this.rows[i].$$level; i++) {
results.push(this.rows[i]);
}
return results;
}
partiallySelectedRow(row) {
let descendant = this.getDescendants(row);
// find any selected row
// this.selection.isSelected(descRow.$$index)
} |
onCheckboxClick(row: Row) {
this.table.selection.toggle(row.$$index);
this.table.events.onCheckbox(row);
} |
It's not working as expected. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any indeterminate selection option for
Tree table grouping.
Only select all or unselect all option.
The text was updated successfully, but these errors were encountered: