@@ -786,10 +786,18 @@ window.component('push.popup', function(popup) {
786
786
{ value : true , title : t ( 'pu.po.tab1.trigger-type.entry' ) , desc : t ( 'pu.po.tab1.cohort-entry-desc' ) } ,
787
787
{ value : false , title : t ( 'pu.po.tab1.trigger-type.exit' ) , desc : t ( 'pu.po.tab1.cohort-exit-desc' ) } ,
788
788
{ value : 'events' , title : t ( 'pu.po.tab1.trigger-type.event' ) , desc : t ( 'pu.po.tab1.cohort-event-desc' ) } ,
789
- ] , value : message . autoOnEntry , onchange : function ( ) {
790
- message . autoEvents ( [ ] ) ;
791
- message . autoCohorts ( [ ] ) ;
792
- }
789
+ ] , value : message . autoOnEntry , onchange : function ( neo , old ) {
790
+ neo = typeof neo === 'boolean' ;
791
+ old = typeof old === 'boolean' ;
792
+ if ( neo ^ old ) {
793
+ message . autoEvents ( [ ] ) ;
794
+ message . autoCohorts ( [ ] ) ;
795
+ cohorts . forEach ( function ( c ) { c . selected ( false ) ; } ) ;
796
+ events . forEach ( function ( c ) { c . selected ( false ) ; } ) ;
797
+ this . selectCohorts . value ( [ ] ) ;
798
+ this . selectEvents . value ( [ ] ) ;
799
+ }
800
+ } . bind ( this )
793
801
} ) ;
794
802
this . selectEvents = new C . multiselect . controller ( {
795
803
placeholder : t ( 'pu.po.tab1.select-event-placeholder' ) ,
0 commit comments