Commit 03a9a80 1 parent ecf19c9 commit 03a9a80 Copy full SHA for 03a9a80
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -253,8 +253,8 @@ class App extends React.Component {
253
253
syncing : false ,
254
254
} ) ;
255
255
256
- this . handleSort ( 'latest' , 'templates' ) ;
257
- this . handleSort ( 'latest' , 'blocks' ) ;
256
+ this . handleSort ( 'latest' , 'templates' , library . templates ) ;
257
+ this . handleSort ( 'latest' , 'blocks' , library . blocks ) ;
258
258
259
259
// Listen for Elementor modal close, so we can reset some states.
260
260
document . addEventListener ( 'modal-close' , ( ) => {
@@ -291,12 +291,12 @@ class App extends React.Component {
291
291
}
292
292
}
293
293
294
- handleSort ( value , library = 'templates' ) {
294
+ handleSort ( value , library = 'templates' , data = false ) {
295
295
this . setState ( {
296
296
showing_favorites : false ,
297
297
} ) ;
298
298
299
- const sortData = this . state [ library ] ;
299
+ const sortData = ( ! data ) ? this . state [ library ] : data ;
300
300
301
301
if ( 'popular' === value ) {
302
302
const sorted = sortData . sort ( ( a , b ) => {
You can’t perform that action at this time.
0 commit comments