File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,25 @@ function init(Survey, $) {
3131 default : null
3232 } ) ;
3333 } ,
34+ fixStyles : function ( el ) {
35+ el . parentElement . querySelector ( ".select2-search__field" ) . style . border =
36+ "none" ;
37+ } ,
3438 afterRender : function ( question , el ) {
39+ var self = this ;
3540 var settings = question . select2Config ;
3641 var $el = $ ( el ) . is ( "select" ) ? $ ( el ) : $ ( el ) . find ( "select" ) ;
37- var select2Input = el . parentElement . querySelector (
38- ".select2-search__field"
39- ) ;
40- select2Input && ( select2Input . style . border = "none" ) ;
4142 $el . select2 ( {
4243 tags : "true" ,
4344 disabled : question . isReadOnly ,
4445 theme : "classic"
4546 } ) ;
47+
48+ self . fixStyles ( el ) ;
49+
4650 var updateValueHandler = function ( ) {
4751 $el . val ( question . value ) . trigger ( "change" ) ;
52+ self . fixStyles ( el ) ;
4853 } ;
4954 var updateChoices = function ( ) {
5055 $el . select2 ( ) . empty ( ) ;
You can’t perform that action at this time.
0 commit comments