File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/bundle/Resources/public/js/scripts/core Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 66 constructor ( config ) {
77 this . container = config . container ;
88 this . acceptKeys = config . acceptKeys ?? [ 'Enter' ] ;
9+ this . shouldAddTagByInputBlur = config . shouldAddTagByInputBlur ?? true ;
910 this . inputNode = config . inputNode ?? this . container . querySelector ( '.ibexa-taggify__input' ) ;
1011 this . listNode = config . listNode ?? this . container . querySelector ( '.ibexa-taggify__list' ) ;
1112 this . tagsPattern = config . tagsPattern ?? null ;
159160
160161 init ( ) {
161162 this . inputNode . addEventListener ( 'keyup' , this . handleInputKeyUp , false ) ;
162- this . inputNode . addEventListener ( 'blur' , this . handleInputBlur , false ) ;
163+
164+ if ( this . shouldAddTagByInputBlur ) {
165+ this . inputNode . addEventListener ( 'blur' , this . handleInputBlur , false ) ;
166+ }
163167 }
164168 }
165169
You can’t perform that action at this time.
0 commit comments