@@ -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 ) ;
58
+ this . removeBundleItemsFromOption ( idx ) ; // would be best to remove the entire html, but see first if remove from data works
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 ) ;
@@ -71,15 +71,8 @@ define([
71
71
* @param {Number|String } index - element index
72
72
*/
73
73
removeBundleItemsFromOption : function ( index ) {
74
- var bundleSelections = registry . get ( this . name + '.' + index + '.' + this . bundleSelectionsName ) ,
75
- bundleSelectionsLength = ( bundleSelections . elems ( ) || [ ] ) . length ,
76
- i ;
77
-
78
- if ( bundleSelectionsLength ) {
79
- for ( i = 0 ; i < bundleSelectionsLength ; i ++ ) {
80
- bundleSelections . elems ( ) [ 0 ] . destroy ( ) ;
81
- }
82
- }
74
+ let bundleSelections = registry . get ( this . name + '.' + index + '.' + this . bundleSelectionsName ) ;
75
+ bundleSelections . destroyChildren ( ) ;
83
76
} ,
84
77
85
78
/**
0 commit comments