Is it possible to have additional columns in the table view of the file manager? For example, add a “modified by” column where the backend sends the name of the person.
I was able to get this to work with the following code:
var fm = webix.ui({
view: "filemanager",
url: "https://your.backend.api.com/"
});
webix.ready(function () {
dt = fm.queryView("datatable", "all")[0];
dt.config.columns.splice(3, 0, { id: "user", header: "User", sort: "string" });
dt.refreshColumns();
});
The backend api needs to add the element using the column Id and the value to the json response. For example, user : “MH”,
[{
"value": "puppy.jpeg",
"id": "/newdirectory/puppy.jpeg",
"size": 10,
"user": ""MH",
"date": 1584377524,
"type": "image"
}, {
"value": "text.txt",
"id": "/newdirectory/text.txt",
"size": 20,
"user": "MH",
"date": 1584377353,
"type": "code"
}
]