Namespace: FileBrowserViewModel¶
Member Of Namespace: clbFileBrowser
Description¶
ViewModel of the clbFileBrowser directive. This instance is accessible by all direct children of the file browser.
It is responsible to handle all the interactions between the user and the services. It does not update the views directly but sends the relevant events when necessary.
Function: handleFocus¶
When the user focus on a browser item, emit a ‘clbFileBrowser:focusChanged’ event.
The event signature is (event, newEntity, previousEntity).
-
handleFocus(entity)¶ Arguments: - entity (Object) – selected entity
Function: loadMoreFiles¶
Load the next page of file entities for the current entity.
-
loadMoreFiles()¶ Return Promise: resolve when the files are loaded
Function: loadMoreFolders¶
Load the next page of folder entities for the current entity.
-
loadMoreFolders()¶ Return Promise: resolve when the folders are loaded