Skip to content

Commit

Permalink
Merge pull request #44 from MasonD/correct-entwine-namespacing
Browse files Browse the repository at this point in the history
Fix issue #41 Field appears empty after adding existing
  • Loading branch information
wilr authored Mar 13, 2020
2 parents e657a80 + 14d98f1 commit ca46399
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions client/src/legacy/hasonefield.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
import jQuery from 'jquery';

jQuery.entwine('ss', ($) => {
$.entwine('ss', function($) {
// Covers both tabular delete button, and the button on the detail form
$('.grid-field.hasonebutton .add-existing-autocompleter .action_gridfield_relationadd').entwine({
onclick: function(e) {
this._super(e);
// Covers both tabular delete button, and the button on the detail form
$('.grid-field.hasonebutton .add-existing-autocompleter .action_gridfield_relationadd').entwine({
onclick: function(e) {
this._super(e);

grid_field = this.getGridField();
grid_field.reload();
}
});
let grid_field = this.getGridField();
grid_field.reload();
}
});
});

0 comments on commit ca46399

Please sign in to comment.