Skip to content

Commit 2255210

Browse files
authored
Merge pull request #17095 from dvarilek/fix-table-loading-indicator-v3
[v3] Fix loading indicator appearing in table after group deselection
2 parents 5b031e4 + eaf1a07 commit 2255210

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

packages/tables/dist/components/table.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/tables/resources/js/components/table.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,15 @@ export default function table() {
6868
toggleSelectRecordsInGroup: async function (group) {
6969
this.isLoading = true
7070

71-
if (this.areRecordsSelected(this.getRecordsInGroupOnPage(group))) {
72-
this.deselectRecords(
73-
await this.$wire.getGroupedSelectableTableRecordKeys(group),
74-
)
71+
const keys =
72+
await this.$wire.getGroupedSelectableTableRecordKeys(group)
7573

76-
return
74+
if (this.areRecordsSelected(this.getRecordsInGroupOnPage(group))) {
75+
this.deselectRecords(keys)
76+
} else {
77+
this.selectRecords(keys)
7778
}
7879

79-
this.selectRecords(
80-
await this.$wire.getGroupedSelectableTableRecordKeys(group),
81-
)
82-
8380
this.isLoading = false
8481
},
8582

0 commit comments

Comments
 (0)