You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[v13] Media Picker: implement paging using getPagedChildren (no server changes) (#20202)
* Avoid throwing an exception on getting references when migrating content with changed data types.
* Revert and handle exception at the consumer side
* Clean up
* Fix issue 12364
fix bug for Media Picker is slow when you have a large number of images at the root folder #12364
* Revert "Fix issue 12364"
This reverts commit 4d86734.
* Media Picker: use getPagedChildren with paging & sorting
Replaces folder view calls to entityResource.getChildren with
entityResource.getPagedChildren in MediaPickerController.
- Adds orderBy/Direction and increases default pageSize to 200
- Resets pagination when entering folders or clearing search
- Updates changePagination to work for both search and folder views
- Keeps legacy behaviour for searchMedia (no breaking server changes)
* Update mediapicker.controller.js
* Update mediapicker.controller.js
* Update mediapicker.controller.js
* Update mediapicker.controller.js
* Fix default values for paging.
* Refactor Media Picker controller: simplify pagination and clarify comments
- Removed unnecessary helper methods (pickPositive / pickNonNegative) and assign pagination values directly,
as backend always provides valid positive/ non-negative numbers.
- Renamed or removed review-only comments to keep codebase clean.
- Clarified purpose of resetting `vm.searchOptions.filter` to explain why the filter is cleared after loading items.
- Adjusted indentation and minor formatting for consistency.
* Media Picker: fix lost paging on reopen by chaining navigation promises
Ensures the Media Picker always loads a paged result when restoring the last
visited folder.
- run(), ensureWithinStartNode(), gotoStartNode(), and gotoFolder() now return
and chain the same promise flow.
- gotoFolder() resolves path → sets current folder → resets pagination →
calls getChildren() (which uses getPagedChildren).
- Fixed cases where reopening the picker showed all items with no pager.
- Kept existing UX: filter is cleared on folder navigation to start unfiltered.
- Minor indentation/formatting cleanups.
* Tidied up indentation.
---------
Co-authored-by: Andy Butland <[email protected]>
Co-authored-by: Kenn Jacobsen <[email protected]>
0 commit comments