<VueFormCreate>
Renders a create button that calls the create method on click. The button is automatically visible only in create mode (when creating a new item) and hidden in update mode (when editing an existing item).
vue
<template>
<VueForm>
<template #default="{...}">
<VueFormCreate v-slot="{ createItem, isCreating, isReading, isLoading }">
<button @click="createItem" :disabled="isCreating">
{{ isCreating ? "Creating..." : "Create" }}
</button>
</VueFormCreate>
</template>
</VueForm>
</template>Slots
default
Slot Props
createItem isCreating isReading isLoading
| Name | Description |
|---|---|
createItem | Function Wrapper for calling create method |
isCreating | Boolean Check the context object docs |
isReading | Boolean Check the context object docs |
isLoading | Boolean Check the context object docs |