@@ -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 ) ;
58+ this . removeBundleItemsFromOption ( idx ) ; // would be best to remove the entire html, but see first if remove from data works
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 ) ;
@@ -71,15 +71,8 @@ define([
7171 * @param {Number|String } index - element index
7272 */
7373 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 ( ) ;
8376 } ,
8477
8578 /**
0 commit comments