Skip to content

Commit

Permalink
fix: Fix deleting contracts loading: (#2847)
Browse files Browse the repository at this point in the history
- Removed unused variable named 'loadingDelete'.
- Used the 'deleting' attr when deleting contacts to indicate the loader component.
  • Loading branch information
Mahmoud-Emad authored Jun 4, 2024
1 parent 7fb9aa2 commit 8f6da60
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-data-table-server
v-if="$props.tableHeaders"
:headers="$props.tableHeaders"
:loading="$props.loading.value"
:loading="$props.loading.value || deleting"
loading-text="Loading contracts..."
v-model="selectedContracts"
:deleting="deleting"
Expand Down Expand Up @@ -122,7 +122,7 @@
variant="outlined"
color="anchor"
prepend-icon="mdi-export-variant"
:disabled="isExporting || !contracts || contracts.length === 0 || loadingDelete || deleting"
:disabled="isExporting || !contracts || contracts.length === 0 || deleting"
@click="exportData"
>
Export
Expand All @@ -131,7 +131,8 @@
<v-btn
variant="outlined"
color="error"
:disabled="!selectedContracts.length || loadingDelete || deleting"
:disabled="!selectedContracts.length || deleting"
:loading="deleting"
prepend-icon="mdi-trash-can-outline"
@click="deletingDialog = true"
>
Expand Down Expand Up @@ -366,7 +367,6 @@ const layout = ref();
const contractLocked = ref<ContractLock>();
const deleting = ref<boolean>(false);
const loadingShowDetails = ref<boolean>(false);
const loadingDelete = ref<boolean>(false);
const contractStateDialog = ref<boolean>(false);
const isExporting = ref<boolean>(false);
const deletingDialog = ref<boolean>(false);
Expand Down

0 comments on commit 8f6da60

Please sign in to comment.