File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
src/pat/contentbrowser/src Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change 8383 relativePath: " @@fileUpload" ,
8484 allowPathSelection: false ,
8585 hiddenInputContainer: " .upload-wrapper" ,
86- success : (fileupload , obj ) => {
87- updatePreview ({
88- uuid: obj .UID ,
89- action: " add" ,
90- });
91- },
92- queuecomplete : (fileUpload , obj ) => {
93- contentItems .get ({ path: $currentPath, updateCache: true });
86+ success: async (fileupload , obj ) => {
87+ await contentItems .get ({ path: $currentPath, updateCache: true });
88+
9489 showUpload = false ;
90+
91+ const level = $contentItems .find (lvl => lvl .displayPath === $currentPath);
92+
93+ if (level && level .results ) {
94+ while (level .load_more ){
95+ await contentItems .get ({ path: $currentPath, loadMorePath: level .path , page: level .page + 1 });
96+ }
97+ const item = level .results .find (it => it .UID === obj .UID );
98+ if (item){
99+ updatePreview ({
100+ data: item,
101+ action: " show" ,
102+ });
103+ scrollToRight ();
104+ }
105+ }
95106 },
96107 });
97108 }
You can’t perform that action at this time.
0 commit comments