Search results

FileManagerComponent

Represents the Essential JS 2 Angular FileManager Component.

<ejs-filemanager showThumbnail='false'></ejs-filemanager>

Properties

ajaxSettings

AjaxSettingsModel

Specifies the AJAX settings of the file manager.

Defaults to { getImageUrl: null; url: null; uploadUrl: null; downloadUrl: null;}

allowMultiSelection

boolean

Enables or disables the multiple files selection of the file manager.

Defaults to true

contextMenuSettings

ContextMenuSettingsModel

Specifies the context menu settings of the file manager.

Defaults to { file: [‘Open’, ’|’, ‘Delete’, ‘Rename’, ’|’, ‘Details’], folder: [‘Open’, ’|’, ‘Delete’, ‘Rename’, ’|’, ‘Details’], layout: [‘SortBy’, ‘View’, ‘Refresh’, ’|’, ‘NewFolder’, ‘Upload’, ’|’, ‘Details’, ’|’, ‘SelectAll’], visible: true,}

cssClass

string

Specifies the root CSS class of the file manager that allows to customize the appearance by overriding the styles.

Defaults to

detailsViewSettings

DetailsViewSettingsModel

Specifies the details view settings of the file manager.

Defaults to {Columns: [{field: ‘name’, headerText: ‘Name’, minWidth: 120, width: ‘auto’, customAttributes: { class: ‘e-fe-grid-name’ },template: ’${name}’},{field: ‘size’, headerText: ‘Size’,minWidth: 50, width: ‘110’, template: ’${size}’},{ field: ‘dateModified’, headerText: ‘DateModified’,minWidth: 50, width: ‘190’}]}

enablePersistence

boolean

Enables or disables persisting component’s state between page reloads. If enabled, following APIs will persist.

  1. view - Represents the previous view of the file manager.
  2. path - Represents the previous path of the file manager.
  3. selectedItems - Represents the previous selected items in the file manager.

Defaults to false

enableRtl

boolean

When set to true, enables RTL mode of the component that displays the content in the right-to-left direction.

Defaults to false

height

string | number

Specifies the height of the file manager.

Defaults to ‘400px’

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

Specifies the navigationpane settings of the file manager.

Defaults to { maxWidth: ‘650px’, minWidth: ‘240px’, visible: true,}

path

string

Specifies the current path of the file manager.

Defaults to ’/’

searchSettings

SearchSettingsModel

Specifies the search settings of the file manager.

Defaults to { allowSearchOnTyping: true, filterType: ‘contains’, ignoreCase: true}

selectedItems

string[]

Specifies the selected folders and files name of the file manager

Defaults to []

showFileExtension

boolean

Show or hide the file extension in file manager.

Defaults to true

showHiddenItems

boolean

Show or hide the files and folders that are marked as hidden.

Defaults to false

showThumbnail

boolean

Shows or hides the thumbnail images in largeicons view.

Defaults to true

toolbarSettings

ToolbarSettingsModel

Specifies the group of items aligned horizontally in the toolbar.

Defaults to { items: [‘NewFolder’, ‘Upload’, ‘Delete’, ‘Download’, ‘Rename’, ‘SortBy’, ‘Refresh’, ‘Selection’, ‘View’, ‘Details’], visible: true}

uploadSettings

UploadSettingsModel

Specifies the upload settings for the file manager.

Defaults to null

view

string

Specifies the initial view of the file manager. With the help of this property, initial view can be changed to details or largeicons view.

Defaults to ‘LargeIcons’

width

string | number

Specifies the width of the file manager.

Defaults to ‘100%’

Methods

destroy

Triggers when the component is destroyed.

Returns void

disableToolbarItems

Disables the specified toolbar items of the file manager.

Parameter Type Description
items string[] Specifies an array of items to be disabled.

Returns void

enableToolbarItems

Enables the specified toolbar items of the file manager.

Parameter Type Description
items string[] Specifies an array of items to be enabled.

Returns void

refreshFiles

Refresh the folder files of the file manager.

Returns void

Events

beforeFileLoad

EmitType<FileBeforeLoadEventArgs>

Triggers before the file/folder is rendered.

beforeFileOpen

EmitType<FileOpenEventArgs>

Triggers before the file/folder is opened.

beforeSend

EmitType<FileBeforeSendEventArgs>

Triggers before the AJAX request send to the server.

created

EmitType<Object>

Triggers when the file manager component is created.

destroyed

EmitType<Object>

Triggers when the file manager component is destroyed.

fileSelect

EmitType<FileSelectEventArgs>

Triggers when the file/folder is selected/unselected.

Triggers when the context menu item is clicked.

Triggers before the context menu is opened.

onError

EmitType<FileOnErrorEventArgs>

Triggers when the AJAX request is failed.

onSuccess

EmitType<FileOnSuccessEventArgs>

Triggers when the AJAX request is success.

toolbarClick

EmitType<FileToolbarClickEventArgs>

Triggers when the toolbar item is clicked.