Vue FileManager Props
This section describes properties that configure the FileManager UI component's contents, behavior, and appearance.
accessKey
Specifies the shortcut key that sets focus on the UI component.
The value of this property will be passed to the accesskey attribute of the HTML element that underlies the UI component.
activeStateEnabled
Specifies whether the UI component changes its state as a result of user interaction.
The UI component switches to the active state when users press down the primary mouse button. When this property is set to true, the CSS rules for the active state apply. You can change these rules to customize the component.
Use this property when you display the component on a platform whose guidelines include the active state change for UI components. See the following GitHub repository for an example of this type of platform: MUI.
allowedFileExtensions
Specifies the allowed upload file extensions.
The FileManager UI component cannot upload a file and displays an error message when the file's extension is not allowed.

- <template>
- <DxFileManager
- :allowed-file-extensions="allowedFileExtensions" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- allowedFileExtensions: ['.js', '.json', '.css']
- };
- }
- };
- </script>
contextMenu
Configures the context menu settings.
currentPath
Specifies the path that is used when the FileManager is initialized.
- <template>
- <DxFileManager
- :current-path="Documents/Images" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- // ...
- };
- }
- };
- </script>
currentPathKeys
Specifies an array of path keys to the current location.
Each path part has each own key. For example, path "folder1/folder2" has two parts: 'folder1' with the 'f1' key and folder2 with the 'f2' key. To open this location, assign the ["f1","f2"] array of strings to the currentPathKeys property value.
- <template>
- <DxFileManager
- :current-path-keys="keys" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- keys: ['EB458000-0341-6943', '92F5-4722-A7D6-98EB']
- };
- }
- };
- </script>
customizeDetailColumns
Customizes columns in details view. Applies only if itemView.mode is "details".
The columns before customization.
The columns after customization.
- <template>
- <DxFileManager ...
- :customize-detail-columns="fileManager_customizeDetailColumns"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import DxFileManager from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- methods: {
- fileManager_customizeDetailColumns(columns) {
- // ...
- // Customize the "columns" array objects here
- // ...
- return columns;
- }
- }
- }
- </script>
customizeThumbnail
Allows you to provide custom icons to be used as thumbnails.
The file or folder whose thumbnail is being customized.
An icon to use as a thumbnail.
This function should return one of the following:
- The icon's URL
- The icon's name if the icon is from the DevExtreme icon library
- The icon's CSS class if the icon is from an external icon library (see External Icon Libraries)
- The icon in the Base64 format
disabled
Specifies whether the UI component responds to user interaction.
elementAttr
Specifies the global attributes to be attached to the UI component's container element.
- <template>
- <DxFileManager ...
- :element-attr="fileManagerAttributes">
- </DxFileManager>
- </template>
- <script>
- import DxFileManager from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- fileManagerAttributes: {
- id: 'elementId',
- class: 'class-name'
- }
- }
- }
- }
- </script>
fileSystemProvider
Specifies the file system provider.
File system providers are components that provide APIs used to access and modify virtual file systems.
The following example illustrates how to configure an Object file system provider:
- <template>
- <DxFileManager
- :file-system-provider="fileSystem">
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- import { fileSystem } from "./data.js";
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- fileSystem
- };
- }
- };
- </script>
- export const fileSystem = [{
- 'name': 'Documents',
- 'isDirectory': true,
- 'items': [{
- 'name': 'Projects',
- 'isDirectory': true,
- 'items': [{
- 'name': 'About.rtf',
- 'isDirectory': false,
- 'size': 1024
- }, {
- 'name': 'Passwords.rtf',
- 'isDirectory': false,
- 'size': 2048
- }]
- }, {
- 'name': 'About.xml',
- 'isDirectory': false,
- 'size': 1024
- }]
- }];
Refer to File System Providers for information on supported file system providers.
focusedItemKey
Specifies a key of the initially or currently focused item.
- <template>
- <DxFileManager
- :focused-item-key="item1_key" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- // ...
- };
- }
- };
- </script>
height
Specifies the UI component's height.
This property accepts a value of one of the following types:
Number
The height in pixels.String
A CSS-accepted measurement of height. For example,"55px","80%","inherit".Function
A function returning either of the above. For example:JavaScript- height: function() {
- return window.innerHeight / 1.5;
- }
hint
Specifies text for a hint that appears when a user pauses on the UI component.
itemView
Configures the file and folder view.

- <template>
- <DxFileManager>
- <DxItemView
- mode="thumbnails"
- :show-folders="false"
- :show-parent-folder="false"
- >
- </DxItemView>
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager,
- DxItemView
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager,
- DxItemView
- },
- data() {
- return {
- //...
- };
- }
- };
- </script>
onContentReady
A function that is executed when the UI component's content is ready and each time the content is changed.
Information about the event.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| model | any | Model data. Available only when using Knockout. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
Model data. Available only when using Knockout.
onContextMenuItemClick
A function that is executed when a context menu item is clicked.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| event | Event (jQuery or EventObject) | The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery. |
| fileSystemItem | The file system item for which you invoke the context menu. | |
| itemData | The clicked item's data. | |
| itemElement | The item's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| itemIndex | The clicked item's index. | |
| model | any | Model data. Available only if you use Knockout. |
| viewArea | 'navPane' | 'itemView' | Specifies whether the context menu is invoked in the navigation panel or in the items area. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
Event (jQuery or EventObject)
The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery.
The file system item for which you invoke the context menu.
The clicked item's data.
The item's container. It is an HTML Element or a jQuery Element when you use jQuery.
The clicked item's index.
Model data. Available only if you use Knockout.
Specifies whether the context menu is invoked in the navigation panel or in the items area.
- <template>
- <DxFileManager
- :on-context-menu-item-click="onItemClick" >
- <DxContextMenu>
- <DxItem text="Create .txt Document" :options="{ extension: '.txt' }" />
- <DxItem text="Create .rtf Document" :options="{ extension: '.rtf' }" />
- <DxItem text="Create .xls Document" :options="{ extension: '.xls' }" />
- </DxContextMenu>
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager,
- DxContextMenu,
- DxItem
- // ...
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager,
- DxContextMenu,
- DxItem
- // ...
- },
- methods: {
- onItemClick(e) {
- if(e.itemData.options.extension) {
- // your code
- }
- }
- },
- data() {
- return {
- //...
- };
- }
- };
- </script>
onContextMenuShowing
A function that is executed before a context menu is displayed.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| cancel | Allows you to cancel showing the context menu. | |
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| event | Event (jQuery or EventObject) | The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery. |
| fileSystemItem | The file system item for which you invoke the context menu. | |
| model | any | Model data. Available only if you use Knockout. |
| targetElement | The file system item's container. It is an HTML Element or a jQuery Element when you use jQuery. This element can be a grid element or a thumbnail (for the items view area), or a tree view node (for the navigation panel). The targetElement field value is 'undefined' if you click on empty space in the items view area. | |
| viewArea | 'navPane' | 'itemView' | Specifies whether the context menu is invoked in the navigation panel or in the items view area. |
Allows you to cancel showing the context menu.
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
Event (jQuery or EventObject)
The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery.
The file system item for which you invoke the context menu.
Model data. Available only if you use Knockout.
The file system item's container. It is an HTML Element or a jQuery Element when you use jQuery. This element can be a grid element or a thumbnail (for the items view area), or a tree view node (for the navigation panel). The targetElement field value is 'undefined' if you click on empty space in the items view area.
Specifies whether the context menu is invoked in the navigation panel or in the items view area.
- <template>
- <DxFileManager
- ...
- @context-menu-showing="onContextMenuShowing"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import DxFileManager from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- methods: {
- onContextMenuShowing(e) {
- const contextMenuItems = ['create', 'rename', 'delete'];
- if (e.viewArea === 'itemView'){
- // your code
- e.cancel = true;
- } else {
- // your code
- e.component.option('contextMenu.items', contextMenuItems);
- }
- }
- }
- }
- </script>
See Also
onCurrentDirectoryChanged
A function that is executed when the current directory is changed.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| directory | The current directory. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| model | any | The model data. Available only if you use Knockout. |
The UI component's instance.
The current directory.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The model data. Available only if you use Knockout.
- <template>
- <DxFileManager
- :on-current-directory-changed="onDirectoryChanged" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- // ...
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- // ...
- },
- methods: {
- onDirectoryChanged(e) {
- // your code
- }
- },
- data() {
- return {
- //...
- };
- }
- };
- </script>
onDisposing
A function that is executed before the UI component is disposed of.
Information about the event.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| model | any | Model data. Available only if you use Knockout. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
Model data. Available only if you use Knockout.
onErrorOccurred
A function that is executed when an error occurs.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| errorCode | The error code. The following error codes are supported:
| |
| errorText | The error message. | |
| fileSystemItem | The processed file or directory. | |
| model | any | Model data. Available only if you use Knockout. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The error code. The following error codes are supported:
NoAccess = 0
FileExists = 1
FileNotFound = 2
DirectoryExists = 3
DirectoryNotFound = 4
WrongFileExtension = 5
MaxFileSizeExceeded = 6
Other = 32767
The error message.
The processed file or directory.
Model data. Available only if you use Knockout.
- <template>
- <DxFileManager
- :on-error-occurred="onError" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- // ...
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- // ...
- },
- methods: {
- onError(e) {
- // your code
- }
- },
- data() {
- return {
- //...
- };
- }
- };
- </script>
onFocusedItemChanged
A function that is executed when the focused item is changed.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| item | The currently focused file or directory. | |
| itemElement | The item's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| model | any | The model data. Available only if you use Knockout. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The currently focused file or directory.
The item's container. It is an HTML Element or a jQuery Element when you use jQuery.
The model data. Available only if you use Knockout.
- <template>
- <DxFileManager
- :on-focused-item-changed="onFocusedItemChangedEv" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- // ...
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- // ...
- },
- methods: {
- onFocusedItemChangedEv(e) {
- // your code
- }
- },
- data() {
- return {
- //...
- };
- }
- };
- </script>
onInitialized
A function used in JavaScript frameworks to save the UI component instance.
Information about the event.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
onOptionChanged
A function that is executed after a UI component property is changed.
Information about the event.
| Name | Type | Description |
|---|---|---|
| model | any | Model data. Available only if you use Knockout. |
| fullName | The path to the modified property that includes all parent properties. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| component | The UI component's instance. | |
| name | The modified property if it belongs to the first level. Otherwise, the first-level property it is nested into. | |
| value | any | The modified property's new value. |
Model data. Available only if you use Knockout.
The path to the modified property that includes all parent properties.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The UI component's instance.
The modified property if it belongs to the first level. Otherwise, the first-level property it is nested into.
The modified property's new value.
The following example shows how to subscribe to component property changes:
- <template>
- <DxFileManager ...
- @option-changed="handlePropertyChange"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import DxFileManager from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- // ...
- methods: {
- handlePropertyChange: function(e) {
- if(e.name === "changedProperty") {
- // handle the property change here
- }
- }
- }
- }
- </script>
onSelectedFileOpened
A function that is executed when the selected file is opened.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| file | The opened file. | |
| model | any | Model data. Available only if you use Knockout. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The opened file.
Model data. Available only if you use Knockout.
- <template>
- <DxFileManager ...
- :on-selected-file-opened="fileManager_onSelectedFileOpened"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import DxFileManager from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- methods: {
- fileManager_onSelectedFileOpened(e) {
- // Your code goes here
- }
- }
- }
- </script>
onSelectionChanged
A function that is executed when a file system item is selected or selection is canceled.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| currentDeselectedItemKeys | The keys of the file system items whose selection has been cleared. | |
| currentSelectedItemKeys | The keys of the file system items that have been selected. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| model | any | Model data. Available only if you use Knockout. |
| selectedItemKeys | The keys of all selected file system items. | |
| selectedItems | The currently selected file system items. |
The UI component's instance.
The keys of the file system items whose selection has been cleared.
The keys of the file system items that have been selected.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
Model data. Available only if you use Knockout.
The keys of all selected file system items.
The currently selected file system items.
- <template>
- <DxFileManager ...
- :on-selection-changed="fileManager_onSelectionChanged"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import DxFileManager from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- methods: {
- fileManager_onSelectionChanged(e) {
- // Your code goes here
- }
- }
- }
- </script>
onToolbarItemClick
A function that is executed when a toolbar item is clicked.
Information about the event that caused the function's execution.
| Name | Type | Description |
|---|---|---|
| component | The UI component's instance. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| event | Event (jQuery or EventObject) | The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery. |
| itemData | The clicked item's data. | |
| itemElement | The item's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| itemIndex | The clicked item's index. | |
| model | any | Model data. Available only if you use Knockout. |
The UI component's instance.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
Event (jQuery or EventObject)
The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery.
The clicked item's data.
The item's container. It is an HTML Element or a jQuery Element when you use jQuery.
The clicked item's index.
Model data. Available only if you use Knockout.
- <template>
- <DxFileManager ...
- :on-toolbar-item-click="fileManager_onToolbarItemClick"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import DxFileManager from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- methods: {
- fileManager_onToolbarItemClick(e) {
- // Your code goes here
- }
- }
- }
- </script>
permissions
Specifies actions that a user is allowed to perform on files and folders.
- <template>
- <DxFileManager>
- <DxPermissions
- :create="true"
- :copy="true"
- :move="true"
- :delete="true"
- :rename="true"
- :upload="true"
- :download="true"
- />
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import { DxFileManager, DxPermissions } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager,
- DxPermissions
- },
- data() {
- return {
- // ...
- }
- }
- }
- </script>
rootFolderName
Specifies the root directory display name.
- <template>
- <DxFileManager
- root-folder-name="Custom Root Folder"
- >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- // ...
- };
- }
- };
- </script>
rtlEnabled
Switches the UI component to a right-to-left representation.
When this property is set to true, the UI component text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.
- DevExpress.config({
- rtlEnabled: true
- });
selectedItemKeys
Contains an array of initially or currently selected files and directories' keys.
- <template>
- <DxFileManager
- :selected-item-keys="keys" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- keys: ['item1_key', 'item2_key', 'item3_key']
- };
- }
- };
- </script>
selectionMode
Specifies whether a user can select a single or multiple files and folders in the item view simultaneously.
- <template>
- <DxFileManager
- :selection-mode="single" >
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager
- },
- data() {
- return {
- // ...
- };
- }
- };
- </script>
tabIndex
Specifies the number of the element when the Tab key is used for navigating.
The value of this property will be passed to the tabindex attribute of the HTML element that underlies the UI component.
toolbar
Configures toolbar settings.

The FileManager UI component allows you to add default and custom toolbar items.
Predefined Items
Predefined toolbar items include:
- 'showNavPane' - Shows or hides the navigation panel.
- 'create' - Creates a new directory.
- 'upload' - Uploads a file.
- 'refresh' - Refreshes the file manager content and shows the progress panel.
- 'download' - Downloads a file.
- 'move' - Moves files and directories.
- 'copy' - Copies files and directories.
- 'rename' - Renames files and directories.
- 'delete' - Deletes files and directories.
- 'switchView' - Switches between the 'Details' and 'Thumbnails' file system representation modes.
- 'clearSelection' - Clears selection from files and directories in the Item View area.
To add a predefined item to the toolbar, specify its name and optional settings ('visible', 'location', 'locateInMenu', 'text', 'icon', 'disabled') and add the item to one of the following collections:
items - Displays toolbar items when no file system item is selected.
fileSelectionItems - Displays toolbar items when one or more file system items are selected.
- <template>
- <DxFileManager>
- <DxToolbar>
- <!-- Specifies a predefined item's name and optional settings -->
- <DxItem name="create" text="Create a directory" icon="newfolder" />
- <!-- Specifies a predefined item's name only -->
- <DxItem name="switchView"/>
- <DxItem name="separator"/>
- <!-- Specifies items that are visible when users select files -->
- <DxFileSelectionItem name="copy"/>
- <DxFileSelectionItem name="rename"/>
- </DxToolbar>
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager,
- DxToolbar,
- DxItem,
- DxFileSelectionItem
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager,
- DxToolbar,
- DxItem,
- DxFileSelectionItem
- },
- data() {
- return {
- //...
- };
- }
- };
- </script>
Custom Items
To add a custom toolbar item, specify its text and optional settings (for example, a file extension for the toolbar item that creates a new file) and add the item to one of the following collections:
items - Displays toolbar items when no file system item is selected.
fileSelectionItems - Displays toolbar items when one or more file system items are selected.
The widget property allows you to specify a UI component for a custom toolbar item (dxButton is the default UI component). Use the toolbarItemClick event to handle clicks on custom toolbar items.
- <template>
- <DxFileManager>
- <DxToolbar>
- <DxItem
- widget="dxMenu"
- :options="fileMenuOptions"
- />
- </DxToolbar>
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager,
- DxToolbar,
- DxItem
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager,
- DxToolbar,
- DxItem
- },
- data() {
- return {
- fileMenuOptions: {
- items: [
- {
- text: "Create new file",
- icon: "plus",
- items: [
- {
- text: "Text Document",
- options: {
- extension: ".txt",
- }
- },
- {
- text: "RTF Document",
- options: {
- extension: ".rtf",
- }
- },
- {
- text: "Spreadsheet",
- options: {
- extension: ".xls",
- }
- }
- ]
- }
- ],
- onItemClick: this.onItemClick
- };
- },
- methods:{
- onItemClick() {
- // ...
- }
- }
- };
- </script>
upload
Configures upload settings.
- <template>
- <DxFileManager>
- <DxUpload
- :chunk-size="500000"
- :max-file-size="1000000"
- />
- </DxFileManager>
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import {
- DxFileManager,
- DxUpload
- } from 'devextreme-vue/file-manager';
- export default {
- components: {
- DxFileManager,
- DxUpload
- },
- data() {
- return {
- //...
- };
- }
- };
- </script>
width
Specifies the UI component's width.
This property accepts a value of one of the following types:
Number
The width in pixels.String
A CSS-accepted measurement of width. For example,"55px","80%","auto","inherit".Function
A function returning either of the above. For example:JavaScript- width: function() {
- return window.innerWidth / 1.5;
- }
