File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/dashboard/Data/Browser Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class Browser extends DashboardView {
5454 this . section = 'Core' ;
5555 this . subsection = 'Browser' ;
5656 this . noteTimeout = null ;
57+ this . currentQuery = null ;
5758 const limit = window . localStorage ?. getItem ( 'browserLimit' ) ;
5859
5960 this . state = {
@@ -221,6 +222,9 @@ class Browser extends DashboardView {
221222 }
222223
223224 componentWillUnmount ( ) {
225+ if ( this . currentQuery ) {
226+ this . currentQuery . cancel ( ) ;
227+ }
224228 this . removeLocation ( ) ;
225229 window . removeEventListener ( 'mouseup' , this . onMouseUpRowCheckBox ) ;
226230 }
@@ -897,6 +901,10 @@ class Browser extends DashboardView {
897901 }
898902
899903 async fetchParseData ( source , filters ) {
904+ if ( this . currentQuery ) {
905+ this . currentQuery . cancel ( ) ;
906+ }
907+
900908 const { useMasterKey, skip, limit } = this . state ;
901909 this . setState ( {
902910 data : null ,
@@ -916,6 +924,7 @@ class Browser extends DashboardView {
916924 localStorage ?. setItem ( 'browserLimit' , limit ) ;
917925
918926 this . excludeFields ( query , source ) ;
927+ this . currentQuery = query ;
919928 let promise = query . find ( { useMasterKey } ) ;
920929 let isUnique = false ;
921930 let uniqueField = null ;
You can’t perform that action at this time.
0 commit comments