fix(data-table): expand batch expansion chevron if all rows are expanded #867 (#873)

Fixes #867
This commit is contained in:
Eric Liu 2021-10-22 07:18:03 -07:00 committed by GitHub
commit fb7ebb93cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,10 +172,7 @@
selectedRowIds.length > 0 && selectedRowIds.length < rows.length; selectedRowIds.length > 0 && selectedRowIds.length < rows.length;
$: if (batchExpansion) { $: if (batchExpansion) {
expandable = true; expandable = true;
expanded = expandedRowIds.length === expandableRowIds.length;
if (expandedRowIds.length < expandableRowIds.length) {
expanded = false;
}
} }
$: if (radio || batchSelection) selectable = true; $: if (radio || batchSelection) selectable = true;
$: tableSortable.set(sortable); $: tableSortable.set(sortable);