close autocomplete on enter
parent
ffff66a92d
commit
22587da5ff
|
@ -34,7 +34,7 @@ export default class AutocompleteWrapperModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
onEnter() {
|
onEnter() {
|
||||||
|
this._updateCallback({close: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
onTab() {
|
onTab() {
|
||||||
|
|
|
@ -116,7 +116,9 @@ export default class EditorModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onAutoComplete = ({replacePart, replaceCaret, close}) => {
|
_onAutoComplete = ({replacePart, replaceCaret, close}) => {
|
||||||
this._replacePart(this._autoCompletePartIdx, replacePart);
|
if (replacePart) {
|
||||||
|
this._replacePart(this._autoCompletePartIdx, replacePart);
|
||||||
|
}
|
||||||
const index = this._autoCompletePartIdx;
|
const index = this._autoCompletePartIdx;
|
||||||
if (close) {
|
if (close) {
|
||||||
this._autoComplete = null;
|
this._autoComplete = null;
|
||||||
|
|
Loading…
Reference in New Issue