React FileManager Props

This section describes properties that configure the FileManager UI component's contents, behavior, and appearance.

See Also

accessKey

Specifies the shortcut key that sets focus on the UI component.

Type:

String

Default Value: undefined

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.

Type:

Boolean

Default Value: false

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.

Type:

Array<String>

Default Value: []

View Demo

The FileManager UI component cannot upload a file and displays an error message when the file's extension is not allowed.

DevExtreme File Manager - Allowed File Extension

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • const allowedFileExtensions = ['.txt', '.doc', '.png'];
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager allowedFileExtensions={allowedFileExtensions} >
  • </FileManager>
  • );
  • }
  • }
  • export default App;

contextMenu

Configures the context menu settings.

Selector: ContextMenu
Type: dxFileManagerContextMenu

currentPath

Specifies the path that is used when the FileManager is initialized.

Type:

String

Default Value: ''

View Demo

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager currentPath="Documents/Images" >
  • </FileManager>
  • );
  • }
  • }
  • export default App;

currentPathKeys

Specifies an array of path keys to the current location.

Type:

Array<String>

Default Value: []

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.

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • const keys = ['EB458000-0341-6943', '92F5-4722-A7D6-98EB']
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager currentPathKeys={keys} >
  • </FileManager>
  • );
  • }
  • }
  • export default App;

customizeDetailColumns

Customizes columns in details view. Applies only if itemView.mode is "details".

Type:

Function

Function parameters:

The columns before customization.

The columns after customization.

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • // Uncomment the following lines if the function should be executed in the component's context
  • // constructor(props) {
  • // super(props);
  • // this.fileManager_customizeDetailColumns = this.fileManager_customizeDetailColumns.bind(this);
  • // }
  •  
  • fileManager_customizeDetailColumns(columns) {
  • // ...
  • // Customize the "columns" array objects here
  • // ...
  • return columns;
  • }
  •  
  • render() {
  • return (
  • <FileManager ...
  • customizeDetailColumns={this.fileManager_customizeDetailColumns}
  • />
  • );
  • }
  • }
  • export default App;

customizeThumbnail

Allows you to provide custom icons to be used as thumbnails.

Type:

Function

Function parameters:
fileSystemItem:

FileSystemItem

The file or folder whose thumbnail is being customized.

Return Value:

String

An icon to use as a thumbnail.

This function should return one of the following:

View Demo

disabled

Specifies whether the UI component responds to user interaction.

Type:

Boolean

Default Value: false

elementAttr

Specifies the global attributes to be attached to the UI component's container element.

Type: any
Default Value: {}

App.js
  • import React from 'react';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • fileManagerAttributes = {
  • id: 'elementId',
  • class: 'class-name'
  • }
  •  
  • render() {
  • return (
  • <FileManager ...
  • elementAttr={this.fileManagerAttributes}>
  • </FileManager>
  • );
  • }
  • }
  • export default App;

fileSystemProvider

Specifies the file system provider.

Type: any
Default Value: null

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:

App.js
data.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  • import { fileSystem } from './data.js';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager fileSystemProvider={fileSystem}>
  • </FileManager>
  • );
  • }
  • }
  • export default App;
  • 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.

Type:

String

Default Value: null

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager focusedItemKey="item1_key" >
  • </FileManager>
  • );
  • }
  • }
  • export default App;

focusStateEnabled

Specifies whether the UI component can be focused using keyboard navigation.

Type:

Boolean

Default Value: false

height

Specifies the UI component's height.

Type:

Number

|

String

|

Function

Return Value:

Number

|

String

The UI component's height.

Default Value: undefined

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.

Type:

String

Default Value: undefined

hoverStateEnabled

Specifies whether the UI component changes its state when a user pauses on it.

Type:

Boolean

Default Value: false

itemView

Configures the file and folder view.

Selector: ItemView
Type:

Object

Default Value: null

NOTE
Set the itemView.mode property to details to configure columns in the UI component.

View Demo

DevExtreme File Manager - Item View

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager, { ItemView } from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager>
  • <ItemView
  • mode="thumbnails"
  • showFolder={false}
  • showParentFolder={false}
  • />
  • </FileManager>
  • );
  • }
  • }
  • export default App;

notifications

Configures notification settings.

Selector: Notifications
Type:

Object

onContentReady

A function that is executed when the UI component's content is ready and each time the content is changed.

Type:

Function

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

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.

Default Value: null

onContextMenuItemClick

A function that is executed when a context menu item is clicked.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

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

FileSystemItem

The file system item for which you invoke the context menu.

itemData

Object

The clicked item's data.

itemElement

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

itemIndex

Number

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.

Default Value: null

App.js
  • import React from 'react';
  • import FileManager, { ContextMenu, Item } from 'devextreme-react/file-manager';
  •  
  • const App = () => {
  • const onItemClick = (e) => {
  • if(e.itemData.extension) {
  • // your code
  • }
  • };
  •  
  • return (
  • <FileManager onContextMenuItemClick={onItemClick}>
  • <ContextMenu>
  • <Item text="Create .txt Document" extension=".txt" />
  • <Item text="Create .rtf Document" extension=".rtf" />
  • <Item text="Create .xls Document" extension=".xls" />
  • </ContextMenu>
  • </FileManager>
  • );
  • };
  •  
  • export default App;

onContextMenuShowing

A function that is executed before a context menu is displayed.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
cancel

Boolean

Allows you to cancel showing the context menu.

component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

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

FileSystemItem

The file system item for which you invoke the context menu.

model any

Model data. Available only if you use Knockout.

targetElement

HTMLElement | jQuery

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.

Default Value: null

App.js
  • import React from 'react';
  • import FileManager, { ContextMenu } from 'devextreme-react/file-manager';
  •  
  • const App = () => {
  • const 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);
  • }
  • };
  •  
  • return (
  • <FileManager ...
  • onContextMenuShowing={onContextMenuShowing} />
  • );
  • }
  •  
  • export default App;

View Demo

See Also

onCurrentDirectoryChanged

A function that is executed when the current directory is changed.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

directory

FileSystemItem

The current directory.

element

HTMLElement | jQuery

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.

Default Value: null

App.js
  • import React from 'react';
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • const App = () => {
  • const onDirectoryChanged = (e) => {
  • // your code
  • };
  •  
  • return (
  • <FileManager onCurrentDirectoryChanged={onDirectoryChanged}>
  • <!-- ... -->
  • </FileManager>
  • );
  • };
  •  
  • export default App;

onDisposing

A function that is executed before the UI component is disposed of.

Type:

Function

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

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.

Default Value: null

onErrorOccurred

A function that is executed when an error occurs.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

errorCode

Number

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

errorText

String

The error message.

fileSystemItem

FileSystemItem

The processed file or directory.

model any

Model data. Available only if you use Knockout.

Default Value: null

App.js
  • import React from 'react';
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • const App = () => {
  • const onError = (e) => {
  • // your code
  • };
  •  
  • return (
  • <FileManager onErrorOccurred={onError}>
  • <!-- ... -->
  • </FileManager>
  • );
  • };
  •  
  • export default App;

onFocusedItemChanged

A function that is executed when the focused item is changed.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

item

FileSystemItem

The currently focused file or directory.

itemElement

HTMLElement | jQuery

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.

Default Value: null

App.js
  • import React from 'react';
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • const App = () => {
  • const onFocusedItemChangedEv = (e) => {
  • // your code
  • };
  •  
  • return (
  • <FileManager onFocusedItemChanged={onFocusedItemChangedEv}>
  • <!-- ... -->
  • </FileManager>
  • );
  • };
  •  
  • export default App;

onInitialized

A function used in JavaScript frameworks to save the UI component instance.

Type:

Function

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

Default Value: null

See Also

onOptionChanged

A function that is executed after a UI component property is changed.

Type:

Function

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
model any

Model data. Available only if you use Knockout.

fullName

String

The path to the modified property that includes all parent properties.

element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

component

FileManager

The UI component's instance.

name

String

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.

Default Value: null

The following example shows how to subscribe to component property changes:

App.js
  • import React from 'react';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • const handlePropertyChange = (e) => {
  • if(e.name === "changedProperty") {
  • // handle the property change here
  • }
  • }
  •  
  • export default function App() {
  • return (
  • <FileManager ...
  • onOptionChanged={handlePropertyChange}
  • />
  • );
  • }

onSelectedFileOpened

A function that is executed when the selected file is opened.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.

file

FileSystemItem

The opened file.

model any

Model data. Available only if you use Knockout.

Default Value: null

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • fileManager_onSelectedFileOpened(e) {
  • // Your code goes here
  • }
  •  
  • render() {
  • return (
  • <FileManager ...
  • onSelectedFileOpened={this.fileManager_onSelectedFileOpened}
  • />
  • );
  • }
  • }
  • export default App;

onSelectionChanged

A function that is executed when a file system item is selected or selection is canceled.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

currentDeselectedItemKeys

Array<String>

The keys of the file system items whose selection has been cleared.

currentSelectedItemKeys

Array<String>

The keys of the file system items that have been selected.

element

HTMLElement | jQuery

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

Array<String>

The keys of all selected file system items.

selectedItems

Array<FileSystemItem>

The currently selected file system items.

Default Value: null

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • fileManager_onSelectionChanged(e) {
  • // Your code goes here
  • }
  •  
  • render() {
  • return (
  • <FileManager ...
  • onSelectionChanged={this.fileManager_onSelectionChanged}
  • />
  • );
  • }
  • }
  • export default App;

onToolbarItemClick

A function that is executed when a toolbar item is clicked.

Type:

Function

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
component

FileManager

The UI component's instance.

element

HTMLElement | jQuery

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

Object

The clicked item's data.

itemElement

HTMLElement | jQuery

The item's container. It is an HTML Element or a jQuery Element when you use jQuery.

itemIndex

Number

The clicked item's index.

model any

Model data. Available only if you use Knockout.

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • fileManager_onToolbarItemClick(e) {
  • // Your code goes here
  • }
  •  
  • render() {
  • return (
  • <FileManager ...
  • onToolbarItemClick={this.fileManager_onToolbarItemClick}
  • />
  • );
  • }
  • }
  • export default App;

permissions

Specifies actions that a user is allowed to perform on files and folders.

Selector: Permissions
Type:

Object

View Demo

App.js
  • import React from 'react';
  • import FileManager, { Permissions } from 'devextreme-react/file-manager';
  •  
  • const App = () => {
  • return (
  • <FileManager>
  • <Permissions
  • create={true}
  • copy={true}
  • move={true}
  • delete={true}
  • rename={true}
  • upload={true}
  • download={true}>
  • </Permissions>
  • </FileManager>
  • );
  • };
  •  
  • export default App;

rootFolderName

Specifies the root directory display name.

Type:

String

Default Value: 'Files'

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager
  • rootFolderName="Custom Root Folder"
  • >
  • </FileManager>
  • );
  • }
  • }
  • export default App;

rtlEnabled

Switches the UI component to a right-to-left representation.

Type:

Boolean

Default Value: false

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.

JavaScript
  • DevExpress.config({
  • rtlEnabled: true
  • });

DataGrid Demo Navigation UI Demo Editors Demo

selectedItemKeys

Contains an array of initially or currently selected files and directories' keys.

Type:

Array<String>

Default Value: []

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • const keys = ['item1_key', 'item2_key', 'item3_key']
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager selectedItemKeys={keys} >
  • </FileManager>
  • );
  • }
  • }
  • export default App;

selectionMode

Specifies whether a user can select a single or multiple files and folders in the item view simultaneously.

Type:

String

Default Value: 'multiple'
Accepted Values: 'multiple' | 'single'

NOTE
The check boxes that select/unselect individual items are displayed only in multiple selection mode.
App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager selectionMode={single} >
  • </FileManager>
  • );
  • }
  • }
  • export default App;

tabIndex

Specifies the number of the element when the Tab key is used for navigating.

Type:

Number

Default Value: 0

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.

Selector: Toolbar
Type: dxFileManagerToolbar

View Demo

DevExtreme File Manager - Toolbar

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.

NOTE
Note that optional settings for predefined toolbar items should be specified at the same level as the item's name property.
App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager, { Toolbar, Item, FileSelectionItem } from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager>
  • <Toolbar>
  • {/* Specifies a predefined item's name and optional settings */}
  • <Item name="create" text="Create a directory" icon="newfolder" />
  • {/* Specifies a predefined item's name only */}
  • <Item name="switchView" />
  • <Item name="separator" />
  • {/* Specifies items that are visible when users select files */}
  • <FileSelectionItem name="copy" />
  • <FileSelectionItem name="rename" />
  • </Toolbar>
  • </FileManager>
  • );
  • }
  • }
  • export default App;

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.

App.js
  • import React from 'react';
  • import 'devextreme/dist/css/dx.light.css';
  • import FileManager, { Toolbar, Item } from 'devextreme-react/file-manager';
  •  
  • const App = () => {
  • const fileMenuOptions = {
  • items: [
  • {
  • text: 'Create new file',
  • icon: 'plus',
  • items: [
  • {
  • text: 'Text Document',
  • extension: '.txt'
  • },
  • {
  • text: 'RTF Document',
  • extension: '.rtf'
  • },
  • {
  • text: 'Spreadsheet',
  • extension: '.xls'
  • }
  • ]
  • }
  • ],
  • onItemClick: 'onItemClick'
  • };
  •  
  • const onItemClick = (e) => {
  • // ...
  • };
  •  
  • return (
  • <FileManager>
  • <Toolbar>
  • <Item widget="dxMenu" options={this.fileMenuOptions} />
  • </Toolbar>
  • </FileManager>
  • );
  • };
  •  
  • export default App;

upload

Configures upload settings.

Selector: Upload
Type:

Object

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import FileManager, { Upload } from 'devextreme-react/file-manager';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <FileManager>
  • <Upload
  • chunkSize={500000}
  • maxFileSize={1000000}
  • />
  • </FileManager>
  • );
  • }
  • }
  • export default App;

visible

Specifies whether the UI component is visible.

Type:

Boolean

Default Value: true

width

Specifies the UI component's width.

Type:

Number

|

String

|

Function

Return Value:

Number

|

String

The UI component's width.

Default Value: undefined

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;
    • }