Skip to content

Commit 4176710

Browse files
committed
- prepop singleLoad can now load data to table
1 parent 1e620de commit 4176710

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

grails-app/assets/javascripts/forms-knockout-bindings.js

+2
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,8 @@
12431243
propTarget.loadData(value);
12441244
} else if (_.isFunction(propTarget.load)) {
12451245
propTarget.load(value);
1246+
} else if (propTarget && propTarget.$parent && _.isFunction(propTarget.$parent["load" + propTarget.listName])) {
1247+
propTarget.$parent["load" + propTarget.listName](value);
12461248
} else if (ko.isObservable(propTarget)) {
12471249
propTarget(value);
12481250
} else {

grails-app/assets/javascripts/forms.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ function orEmptyArray(v) {
10831083
var parent = context.parent;
10841084
var listName = context.listName;
10851085
var modelName = context.outputModel.name;
1086-
1086+
self.$parent = context.parent;
10871087
self.listName = listName;
10881088
self.addRow = function (data) {
10891089
var newItem = self.newItem(data, self.rowCount());

0 commit comments

Comments
 (0)