@@ -445,21 +445,28 @@ class DropDownEditor<
445445 return promise . always ( this . _renderField . bind ( this ) ) ;
446446 }
447447
448- _getButtonsContainer ( ) : dxElementWrapper {
448+ _getButtonsContainer ( ) : dxElementWrapper | null | undefined {
449449 const fieldTemplate = this . _getFieldTemplate ( ) ;
450+
450451 return fieldTemplate ? this . _$container : this . _$textEditorContainer ;
451452 }
452453
453454 _renderBeforeFieldAddon ( ) : void {
454- if ( ! this . _$beforeFieldAddon ) {
455+ if (
456+ ! this . _$beforeFieldAddon
457+ && this . _$textEditorContainer
458+ ) {
455459 this . _$beforeFieldAddon = $ ( '<div>' )
456460 . addClass ( DROP_DOWN_EDITOR_BEFORE_FIELD_ADDON )
457461 . insertBefore ( this . _$textEditorContainer ) ;
458462 }
459463 }
460464
461465 _renderAfterFieldAddon ( ) : void {
462- if ( ! this . _$afterFieldAddon ) {
466+ if (
467+ ! this . _$afterFieldAddon
468+ && this . _$textEditorContainer
469+ ) {
463470 this . _$afterFieldAddon = $ ( '<div>' )
464471 . addClass ( DROP_DOWN_EDITOR_AFTER_FIELD_ADDON )
465472 . insertAfter ( this . _$textEditorContainer ) ;
@@ -479,6 +486,7 @@ class DropDownEditor<
479486
480487 _renderTemplateWrapper ( ) : void {
481488 const fieldTemplate = this . _getFieldTemplate ( ) ;
489+
482490 if ( ! fieldTemplate ) {
483491 return ;
484492 }
@@ -495,10 +503,10 @@ class DropDownEditor<
495503 this . _detachKeyboardEvents ( ) ;
496504 this . _detachFocusEvents ( ) ;
497505
498- this . _$textEditorContainer . remove ( ) ;
506+ this . _$textEditorContainer ? .remove ( ) ;
499507
500508 const $newTemplateWrapper = createTemplateWrapperElement ( ) ;
501- this . _$templateWrapper ! . replaceWith ( $newTemplateWrapper ) ;
509+ this . _$templateWrapper ? .replaceWith ( $newTemplateWrapper ) ;
502510 this . _$templateWrapper = $newTemplateWrapper ;
503511
504512 const currentRenderContext = Symbol ( 'renderContext' ) ;
0 commit comments