feat: clear selection when reloading data in multi-check mode
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Javier Segarra 2025-05-08 12:24:04 +02:00
parent cbb36d0ec7
commit 42cd002a5f
1 changed files with 9 additions and 6 deletions

View File

@ -331,9 +331,15 @@ function stopEventPropagation(event) {
event.stopPropagation();
}
function clearSelected() {
if ($props.multiCheck.expand) {
selectAll.value = false;
selected.value = [];
}
}
function reload(params) {
selected.value = [];
selectAll.value = false;
clearSelected();
CrudModelRef.value.reload(params);
}
@ -684,10 +690,7 @@ const handleHeaderSelection = (evt, data) => {
ref="CrudModelRef"
@on-fetch="
(...args) => {
if ($props.multiCheck.expand) {
selectAll = false;
selected = [];
}
clearSelected();
emit('onFetch', ...args);
}
"