When we use deps functionality, backform controls re-render then. But before we re-render them we must remove old grid (if any) otherwise is causes js error "Unable to call exitEditMode of undefined". Fixes #1497

This commit is contained in:
Harshal Dhumal
2016-07-25 14:31:17 +01:00
committed by Dave Page
parent 9dd3cf2399
commit 875360d1c8
3 changed files with 26 additions and 5 deletions

View File

@@ -371,6 +371,11 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
titleTmpl({label: data.label})
);
// Clean up existing grid if any (in case of re-render)
if (self.grid) {
self.grid.remove();
}
$gridBody.append(self.generateHeader(data));
var gridSchema = _.clone(this.gridSchema);