@@ -55,7 +55,7 @@ define([
5555 this . source . set ( path , optionBaseData ) ;
5656 this . source . set ( path + '.bundle_button_proxy' , [ ] ) ;
5757 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 ) ;
5959 _ . each ( rec [ 'bundle_selections' ] , function ( obj , index ) {
6060 this . source . set ( path + '.bundle_button_proxy' + '.' + index , rec [ 'bundle_button_proxy' ] [ index ] ) ;
6161 this . source . set ( path + '.bundle_selections' + '.' + index , obj ) ;
@@ -72,6 +72,7 @@ define([
7272 */
7373 removeBundleItemsFromOption : function ( index ) {
7474 let bundleSelections = registry . get ( this . name + '.' + index + '.' + this . bundleSelectionsName ) ;
75+
7576 bundleSelections . destroyChildren ( ) ;
7677 } ,
7778
@@ -80,9 +81,9 @@ define([
8081 */
8182 processingAddChild : function ( ctx , index , prop ) {
8283 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 ) ;
8687
8788 prop = maxRecordId > - 1 ? maxRecordId + 1 : prop ;
8889 this . _super ( ctx , index , prop ) ;
0 commit comments