Changing View Configuration, JavaScript Programming Example of Changing View Configuration in File Manager

JavaScript Programming Example of Changing View Configuration in File Manager

Customize view configuration in Webix File Manager using onViewInit event handler. In this programming example, multi-selection is turned off for the 'table' and 'files' views. Feel free to use this piece of code for configuring your File Manager.

JS Code

webix.ui({
  rows:[
    { view: "label", css: "header", label: "onViewInit event handler allows customizing views configuration. In this sample multi-selection is turned off for the 'table' and 'files' views" },
    {
      view:"filemanager",
      id:"files",
      on:{
        "onViewInit": function(name, config){
          // disable multi-selection for "table" and "files" views
          if (name == "table" || name == "files"){
            config.select = true;
          }
        }
      }
    }
  ]

});
$$("files").load("https://docs.webix.com/filemanager/samples/server/");

HTML Code

<style>
  .header div{
  	padding: 0 10px;
  }
</style>