link parent autocomplete fix

This commit is contained in:
Yuri Kuznetsov
2024-03-08 16:27:14 +02:00
parent 35eb013c97
commit 7573bd1f92
2 changed files with 18 additions and 0 deletions
+16
View File
@@ -29,6 +29,9 @@
import $ from 'jquery';
import Handlebars from 'handlebars';
/**
* An autocomplete.
*/
class Autocomplete {
/** @module ui/autocomplete */
@@ -164,13 +167,26 @@ class Autocomplete {
});
}
/**
* Dispose.
*/
dispose() {
this.$element.autocomplete('dispose');
}
/**
* Hide.
*/
hide() {
this.$element.autocomplete('hide');
}
/**
* Clear.
*/
clear() {
this.$element.autocomplete('clear');
}
}
export default Autocomplete;
+2
View File
@@ -533,6 +533,8 @@ class LinkParentFieldView extends BaseFieldView {
this.once('render remove', () => autocomplete.dispose());
Select.init(this.$elementType, {});
this.$elementType.on('change', () => autocomplete.clear());
}
}