Skip to content

Commit

Permalink
BUG Do not override grid state with search parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Rainville authored and bergice committed Nov 17, 2020
1 parent a000151 commit 7594ef2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion client/src/legacy/GridField.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ $.entwine('ss', function($) {
}

var formLink = this.find('.edit-link, .view-link');
if(formLink.length) this.getGridField().showDetailView(formLink.prop('href'));
if(formLink.length) {
this.getGridField().showDetailView(formLink.prop('href'));
}
},
onmouseover: function() {
if(this.find('.edit-link, .view-link').length) this.css('cursor', 'pointer');
Expand Down
4 changes: 0 additions & 4 deletions client/src/legacy/LeftAndMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -1256,10 +1256,6 @@ $.entwine('ss', function($) {
*/
$('.cms .grid-field:not([cms-loading-ignore-url-params])').entwine({
showDetailView: function(url) {
// Include any GET parameters from the current URL, as the view state might depend on it.
// For example, a list prefiltered through external search criteria might be passed to GridField.
var params = window.location.search.replace(/^\?/, '');
if(params) url = $.path.addSearchParams(url, params);
$('.cms-container').loadPanel(url);
}
});
Expand Down

0 comments on commit 7594ef2

Please sign in to comment.