# Buttons
You will find here all buttons components reference used inside VuetifyAdmin.
# Action
VaActionButton
Component tu use for any custom action button. Can be used on data table rows or top header of create, show and edit pages.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
type | string | Set the button's type attribute. |
to | string|object | Vue route to redirect on click. |
href | string|object | Turn button to anchor and use href. |
target | string | Anchor target if href used. |
loading | boolean | Active a spinner if enabled. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# List
VaListButton
Button for all list resource action. Redirect to list page by default. Shown on internal CRUD page at top header.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Show
VaShowButton
Button for all show resource action. Redirect to show page by default.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
disableRedirect | boolean | Disable default redirect behavior for compatible buttons Force button to be shown, prevent hiding it according to default behavior if no action exist. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Create
VaCreateButton
Button for all create resource action. Redirect to create page by default.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
disableRedirect | boolean | Disable default redirect behavior for compatible buttons Force button to be shown, prevent hiding it according to default behavior if no action exist. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Edit
VaEditButton
Button for all edit resource action. Redirect to edit page by default.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
disableRedirect | boolean | Disable default redirect behavior for compatible buttons Force button to be shown, prevent hiding it according to default behavior if no action exist. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Clone
VaCloneButton
Button for all clone resource action. Redirect to create page by default with target ID of original resource to clone.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
disableRedirect | boolean | Disable default redirect behavior for compatible buttons Force button to be shown, prevent hiding it according to default behavior if no action exist. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Delete
VaDeleteButton
Button for all delete resource action. Comes with confirm dialog. Auto hide if no delete action available unless show prop is active.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
redirect | boolean | Redirect to resource list after successful deletion. Default redirect active if current page is resource being deleted. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
delete | Custom delete action if no item. Used for bulk delete button which has his custom logic. |
deleted | Triggered on successful deletion of resource item. |
# Associate
VaAssociateButton
Action button for resource association. Used on lists with association enabled. Dumb component, just a submit button.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Dissociate
VaDissociateButton
Action button for resource dissociation. Used on data tables with association enabled. Comes with confirm dialog.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
source | string | POST Request property name for update. |
sourceId | number|string | Id of resource to unlink. |
sourceResource | string | Name of resource to be unlinked. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
dissociated | Triggered on successful dissociation of resource item. |
# Bulk action
VaBulkActionButton
Generic customizable button for update bulk actions in VaList component.
Shown after items selections. Use updateMany
data provider method under the hood.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
value | array | Selected resources items. |
action | object | Data object to send on updateMany data provider method.
Contains the resource properties to update. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
input | Cleanup selected elements |
# Bulk delete
VaBulkDeleteButton
Button for delete bulk actions for VaList. Shown after items selections.
Keep all VaDeleteButton feature and use deleteMany
data provider method under the hood.
PROPS
Props | Type | Description |
---|---|---|
value | array | Selected resources items. |
EVENTS
Name | Description |
---|---|
input | Cleanup selected elements |
# Export
VaExportButton
Action button for export all data from a list iterator, aka VaList. Use current state of VaList, i.e. keep current filters and sorts while removing pagination limitation. Will provoke a download of a CSV file generated on client side thanks to papaparse library.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
options | object | Current state of list, with mainly current sorting. |
filter | object | Current filter state of the list. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Locale
VaLocaleButton
Locale button which allows resource translation. Will list all configured supported languages as dropdown menu. Change current locale on current resource store for contextualized fetching or saving on backend API.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |
# Save
VaSaveButton
Default saving button that can be used for VaForm component. Dumb component, just a submit button, VaForm do the real work.
MIXINS
PROPS
Props | Type | Description |
---|---|---|
item | null | Item attached to the button. |
icon | boolean | If true, show button with icon only, label will be shown as tooltip. |
color | string | Customizable background or text color, dependably of text prop value. |
text | boolean | Remove background button. |
label | string | Override default label. |
redirect | string | Default route resource action to redirect after saving.
Disable the default submit behavior if set.
For specific redirect on submit, prefer redirect prop on VaForm |
EVENTS
Name | Description |
---|---|
click | Triggered on click, send related item if available. |