Skip to content

<VueFormUnarchive> ​

Renders a unarchive button that calls the unarchive method on click. The button is automatically visible only in update mode.

vue
<template>
  <VueForm>
    <template #default="{...}">
      <VueFormUnarchive
        v-slot="{ unarchiveItem, isUnarchiving, isReading, isLoading }"
      >
        <button
          @click="confirmUnarchive(unarchiveItem)"
          :disabled="isUnarchiving"
        >
          {{ isUnarchiving ? "Unarchiving..." : "Unarchive" }}
        </button>
      </VueFormUnarchive>
    </template>
  </VueForm>
</template>

<script setup>
function confirmUnarchive(unarchiveItem) {
  if (confirm("Are you sure?")) {
    unarchiveItem();
  }
}
</script>

Slots ​

default ​

Slot Props ​

NameDescription
unarchiveItemFunction
Wrapper for calling unarchive method
isUnarchivingBoolean
Check the context object docs
isReadingBoolean
Check the context object docs
isLoadingBoolean
Check the context object docs

Version 1.0.0