Vue CardView - toolbar

Configures the toolbar.

Type:

Toolbar

disabled

Specifies whether the toolbar responds to user interaction.

Type:

Boolean

Default Value: false

items[]

Configures toolbar items.

The toolbar can contain the following elements as items:

  • Predefined controls
    Predefined controls appear on the toolbar depending on whether a specific CardView feature is enabled. The following table illustrates the dependency:

    Control NameImagePrerequisites
    addCardButtonDevExtreme CardView toolbar addCardButtonediting.allowAdding is true
    columnChooserButtonDevExtreme CardView toolbar columnChooserButtoncolumnChooser.enabled is true
    searchPanelDevExtreme CardView toolbar searchPanelsearchPanel.visible is true
    selectAllButtonDevExtreme CardView toolbar selectAllButtonselection.allowSelectAll is true and selection.mode is 'multiple'
    clearSelectionButtonDevExtreme CardView toolbar clearSelectionButtonselection.mode is 'single' or 'multiple'

    If you need to customize a predefined control, add an object to the items[] array. This object must contain the control's name and properties that you want to customize. If a control does not need customization, simply include its name in the toolbar.items[] array.

    The example below customizes the Column Chooser button, adds an Add Card button, and enables the corresponding CardView features:

    App.vue
    • <template>
    • <DxCardView ... >
    • <DxEditing :allow-adding="true" />
    • <DxColumnChooser :enabled="true"/>
    • <DxToolbar>
    • <DxItem name="addCardButton" />
    • <DxItem
    • name="columnChooserButton"
    • locate-in-menu="auto"
    • location="after"
    • />
    • </DxToolbar>
    • </DxCardView>
    • </template>
    • <script setup lang="ts">
    • import { DxCardView, DxEditing, DxColumnChooser, DxToolbar, DxItem } from 'devextreme-vue/card-view';
    • </script>
    IMPORTANT
    CardView does not display controls missing from the items[] array. Ensure that this array includes controls for all enabled features.
  • DevExtreme components

    You can use DevExtreme components as toolbar items. Declare a DxItem element to add a supported component:

    App.vue
    • <template>
    • <DxCardView ... >
    • <DxToolbar>
    • <DxItem>
    • <DxSelectBox>
    • <!-- SelectBox properties are specified here -->
    • </DxSelectBox>
    • </DxItem>
    • </DxToolbar>
    • </DxCardView>
    • </template>
    • <script setup lang="ts">
    • import { DxCardView, DxToolbar, DxItem } from 'devextreme-vue/card-view';
    • import { DxSelectBox } from 'devextreme-vue/select-box';
    • </script>
  • Custom controls
    To use a custom control, specify a template.

multiline

Specifies whether the toolbar arranges items into multiple lines when their combined width exceeds the toolbar width.

Type:

Boolean

Default Value: false

Note that if you set the multiline property to true, you cannot use the following item properties:

visible

Specifies whether the toolbar is visible.

Type:

Boolean

| undefined
Default Value: undefined

This property can have one of the following values:

toolbar.visibleDescription
trueThe toolbar is always visible.
falseThe toolbar is always hidden.
undefinedThe toolbar is visible only if there are items to display.