diff --git a/src/blocks/curated-list/edit.js b/src/blocks/curated-list/edit.js index f2f069ae..162e516e 100644 --- a/src/blocks/curated-list/edit.js +++ b/src/blocks/curated-list/edit.js @@ -116,7 +116,7 @@ const CuratedListEditorComponent = ( { setError( null ); const posts = await apiFetch( { path: addQueryArgs( '/newspack-listings/v1/listings', { - query: { ...query, maxItems: MAX_EDITOR_ITEMS }, // Get up to MAX_EDITOR_ITEMS listings in the editor so we can show all locations. + query: { maxItems: MAX_EDITOR_ITEMS, ...query }, // Get up to MAX_EDITOR_ITEMS listings in the editor so we can show all locations. _fields: 'id,title,author,category,tags,excerpt,media,meta,type,sponsors', } ), } ); @@ -307,27 +307,20 @@ const CuratedListEditorComponent = ( { * @param {Object} listing Post object for listing to show. * @param {number} index Index of the item in the array. */ - const renderQueriedListings = ( listing, index ) => { - // Only display up to the maxItems setting. - if ( index >= queryOptions.maxItems ) { - return null; - } - - return ( -
- - { - - } -
- ); - }; + const renderQueriedListings = ( listing, index ) => ( +
+ + { + + } +
+ ); /** * Validate location data. diff --git a/src/components/sidebar-query-controls.js b/src/components/sidebar-query-controls.js index 9f1239ed..602fb6b4 100644 --- a/src/components/sidebar-query-controls.js +++ b/src/components/sidebar-query-controls.js @@ -243,7 +243,7 @@ class QueryControls extends Component { setAttributes( { queryOptions: { ...queryOptions, maxItems: value } } ) } min={ 1 } - max={ 20 } + max={ 50 } required />,