@@ -44,8 +44,7 @@ import { withRouter } from 'lib/withRouter';
4444import { get } from 'lib/AJAX' ;
4545import BrowserFooter from './BrowserFooter.react' ;
4646
47- const SELECTED_ROWS_MESSAGE =
48- 'There are selected rows. Are you sure you want to leave this page?' ;
47+ const SELECTED_ROWS_MESSAGE = 'There are selected rows. Are you sure you want to leave this page?' ;
4948
5049function SelectedRowsNavigationPrompt ( { when } ) {
5150 const message = SELECTED_ROWS_MESSAGE ;
@@ -119,7 +118,7 @@ function SelectedRowsNavigationPrompt({ when }) {
119118}
120119
121120// The initial and max amount of rows fetched by lazy loading
122- const BROWSER_LAST_LOCATION = 'brower_last_location ' ;
121+ const BROWSER_LAST_LOCATION = 'browser_last_location ' ;
123122
124123@subscribeTo ( 'Schema' , 'schema' )
125124@withRouter
@@ -386,6 +385,13 @@ class Browser extends DashboardView {
386385 }
387386 addLocation ( appId ) {
388387 if ( window . localStorage ) {
388+ const currentSearch = this . props . location ?. search ;
389+ if ( currentSearch ) {
390+ const params = new URLSearchParams ( currentSearch ) ;
391+ if ( params . has ( 'filters' ) ) {
392+ return ;
393+ }
394+ }
389395 let pathname = null ;
390396 const newLastLocations = [ ] ;
391397
@@ -1505,22 +1511,17 @@ class Browser extends DashboardView {
15051511
15061512 if ( error . code === Parse . Error . AGGREGATE_ERROR ) {
15071513 if ( error . errors . length == 1 ) {
1508- errorDeletingNote =
1509- `Error deleting ${ className } with id '${ error . errors [ 0 ] . object . id } '` ;
1514+ errorDeletingNote = `Error deleting ${ className } with id '${ error . errors [ 0 ] . object . id } '` ;
15101515 } else if ( error . errors . length < toDeleteObjectIds . length ) {
1511- errorDeletingNote =
1512- `Error deleting ${ error . errors . length } out of ${ toDeleteObjectIds . length } ${ className } objects` ;
1516+ errorDeletingNote = `Error deleting ${ error . errors . length } out of ${ toDeleteObjectIds . length } ${ className } objects` ;
15131517 } else {
1514- errorDeletingNote =
1515- `Error deleting all ${ error . errors . length } ${ className } objects` ;
1518+ errorDeletingNote = `Error deleting all ${ error . errors . length } ${ className } objects` ;
15161519 }
15171520 } else {
15181521 if ( toDeleteObjectIds . length == 1 ) {
1519- errorDeletingNote =
1520- `Error deleting ${ className } with id '${ toDeleteObjectIds [ 0 ] } '` ;
1522+ errorDeletingNote = `Error deleting ${ className } with id '${ toDeleteObjectIds [ 0 ] } '` ;
15211523 } else {
1522- errorDeletingNote =
1523- `Error deleting ${ toDeleteObjectIds . length } ${ className } objects` ;
1524+ errorDeletingNote = `Error deleting ${ toDeleteObjectIds . length } ${ className } objects` ;
15241525 }
15251526 }
15261527
@@ -2526,9 +2527,7 @@ class Browser extends DashboardView {
25262527 < Helmet >
25272528 < title > { pageTitle } </ title >
25282529 </ Helmet >
2529- < SelectedRowsNavigationPrompt
2530- when = { Object . keys ( this . state . selection ) . length > 0 }
2531- />
2530+ < SelectedRowsNavigationPrompt when = { Object . keys ( this . state . selection ) . length > 0 } />
25322531 { browser }
25332532 { notification }
25342533 { extras }
0 commit comments