@@ -243,13 +243,14 @@ export async function getAllEntries(
243243 totalCount : number ;
244244 entries : EntryValue [ ] ;
245245 } ) => void ,
246+ sync = false ,
246247) {
247248 const backend = currentBackend ( state . config ) ;
248249 const integration = selectIntegration ( state , collection . get ( 'name' ) , 'listEntries' ) ;
249250 const provider : Backend = integration
250251 ? getIntegrationProvider ( state . integrations , backend . getToken , integration )
251252 : backend ;
252- const entries = await provider . listAllEntries ( collection , onProgress ) ;
253+ const entries = await provider . listAllEntries ( collection , onProgress , sync ) ;
253254 return entries ;
254255}
255256
@@ -955,7 +956,7 @@ export function loadEntries(collection: Collection, page = 0, sync = false) {
955956 // For nested collections, we MUST load ALL entries at once with proper depth handling
956957 // to build the navigation tree. Use getAllEntries which calls allEntriesByFolder.
957958 console . log ( `[loadEntries] Loading all entries for nested collection: ${ collectionName } ` ) ;
958- const allEntries = await getAllEntries ( state , collection ) ;
959+ const allEntries = await getAllEntries ( state , collection , sync ) ;
959960 console . log (
960961 `[loadEntries] getAllEntries returned ${ allEntries . length } entries for ${ collectionName } ` ,
961962 ) ;
@@ -1390,11 +1391,12 @@ export function persistEntry(collection: Collection) {
13901391 if ( assetProxies . length > 0 ) {
13911392 await dispatch ( loadMedia ( ) ) ;
13921393 }
1393-
1394+
13941395 // Create entry with updated slug for cache update
1395- const persistedEntry = newSlug !== serializedEntry . get ( 'slug' )
1396- ? serializedEntry . set ( 'slug' , newSlug )
1397- : serializedEntry ;
1396+ const persistedEntry =
1397+ newSlug !== serializedEntry . get ( 'slug' )
1398+ ? serializedEntry . set ( 'slug' , newSlug )
1399+ : serializedEntry ;
13981400 dispatch ( entryPersisted ( collection , persistedEntry , newSlug ) ) ;
13991401 if ( collection . has ( 'nested' ) ) {
14001402 await dispatch ( loadEntries ( collection ) ) ;
0 commit comments