@oat-sa/tao-core-ui 3.9.5 → 3.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -258,7 +258,11 @@ define(['jquery', 'lodash', 'core/request', 'ui/pagination', 'handlebars', 'lib/
|
|
|
258
258
|
name: file.name
|
|
259
259
|
})) {
|
|
260
260
|
updatePermissions(file);
|
|
261
|
-
|
|
261
|
+
const childrenFilesOnly = _.filter(subTree.children, function (child) {
|
|
262
|
+
// Only file object has link property
|
|
263
|
+
return Object.prototype.hasOwnProperty.call(child, 'link');
|
|
264
|
+
});
|
|
265
|
+
if (childrenFilesOnly.length === subTree.total) {
|
|
262
266
|
// all children loaded new file can be pushed to the end of tree
|
|
263
267
|
// if not all, new file will be loaded with next page
|
|
264
268
|
subTree.children.push(file);
|
package/package.json
CHANGED
|
@@ -127,7 +127,12 @@ export default function (options) {
|
|
|
127
127
|
}
|
|
128
128
|
if (root !== 'local' || !_.find(subTree.children, { name: file.name })) {
|
|
129
129
|
updatePermissions(file);
|
|
130
|
-
|
|
130
|
+
const childrenFilesOnly = _.filter(subTree.children, function (child) {
|
|
131
|
+
// Only file object has link property
|
|
132
|
+
return Object.prototype.hasOwnProperty.call(child, 'link');
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
if (childrenFilesOnly.length === subTree.total) {
|
|
131
136
|
// all children loaded new file can be pushed to the end of tree
|
|
132
137
|
// if not all, new file will be loaded with next page
|
|
133
138
|
subTree.children.push(file);
|