@@ -55,7 +55,7 @@ define([
55
55
this . source . set ( path , optionBaseData ) ;
56
56
this . source . set ( path + '.bundle_button_proxy' , [ ] ) ;
57
57
this . source . set ( path + '.bundle_selections' , [ ] ) ;
58
- this . removeBundleItemsFromOption ( idx ) ; // would be best to remove the entire html, but see first if remove from data works
58
+ this . removeBundleItemsFromOption ( idx ) ;
59
59
_ . each ( rec [ 'bundle_selections' ] , function ( obj , index ) {
60
60
this . source . set ( path + '.bundle_button_proxy' + '.' + index , rec [ 'bundle_button_proxy' ] [ index ] ) ;
61
61
this . source . set ( path + '.bundle_selections' + '.' + index , obj ) ;
@@ -72,6 +72,7 @@ define([
72
72
*/
73
73
removeBundleItemsFromOption : function ( index ) {
74
74
let bundleSelections = registry . get ( this . name + '.' + index + '.' + this . bundleSelectionsName ) ;
75
+
75
76
bundleSelections . destroyChildren ( ) ;
76
77
} ,
77
78
@@ -80,9 +81,9 @@ define([
80
81
*/
81
82
processingAddChild : function ( ctx , index , prop ) {
82
83
var recordIds = _ . map ( this . recordData ( ) , function ( rec ) {
83
- return parseInt ( rec [ 'record_id' ] , 10 ) ;
84
- } ) ,
85
- maxRecordId = _ . max ( recordIds ) ;
84
+ return parseInt ( rec [ 'record_id' ] , 10 ) ;
85
+ } ) ,
86
+ maxRecordId = _ . max ( recordIds ) ;
86
87
87
88
prop = maxRecordId > - 1 ? maxRecordId + 1 : prop ;
88
89
this . _super ( ctx , index , prop ) ;
0 commit comments