Kaynağa Gözat

Hide mention ui panel when no items in list.

Maciej Gołaszewski 6 yıl önce
ebeveyn
işleme
ee2c4a323b

+ 5 - 1
packages/ckeditor5-mention/src/mentionui.js

@@ -126,7 +126,11 @@ export default class MentionUI extends Plugin {
 				items.add( { label: item } );
 				items.add( { label: item } );
 			}
 			}
 
 
-			this._showForm();
+			if ( items.length ) {
+				this._showForm();
+			} else {
+				this._hideForm();
+			}
 		} );
 		} );
 
 
 		watcher.on( 'unmatched', () => {
 		watcher.on( 'unmatched', () => {