diff --git a/frontend/src/components/DataTable.vue b/frontend/src/components/DataTable.vue index fd7cbfcb4..79bcde2c9 100644 --- a/frontend/src/components/DataTable.vue +++ b/frontend/src/components/DataTable.vue @@ -129,7 +129,7 @@ interface Props { const props = defineProps(); const { - dataList, dataKey, columns, dataName, allowMultiSelect, loading, + dataList, dataKey, columns, dataName, allowMultiSelect, loading } = toRefs(props); const { t } = useI18n(); @@ -146,6 +146,14 @@ const columnSpan = computed(() => (columns.value.length + (allowMultiSelect.valu const selectedRows = ref([]); const mutableDataList = ref(null); +const clearSelectedRows = () => { + selectedRows.value = []; +} + +defineExpose({ + clearSelectedRows, +}); + /** * Returns either a filtered data list, or the original all nice and paginated */ diff --git a/frontend/src/views/admin/WaitingListPanelView.vue b/frontend/src/views/admin/WaitingListPanelView.vue index 414ccbe95..b2abee193 100644 --- a/frontend/src/views/admin/WaitingListPanelView.vue +++ b/frontend/src/views/admin/WaitingListPanelView.vue @@ -34,6 +34,7 @@ const loading = ref(true); const pageError = ref(''); const pageNotification = ref(''); const selectedFields = ref([]); +const dataTableRef = ref(null); const filteredUsers = computed(() => waitingListUsers.value.map((user) => ({ id: { @@ -216,6 +217,7 @@ const sendInvites = async () => { // Unselect everything! selectedFields.value = []; + dataTableRef.value.clearSelectedRows(); await refresh(); loading.value = false; @@ -254,6 +256,7 @@ onMounted(async () => {