Use containerMenu as a base for HintMenu instead of regular menu
Change-Id: Ic1ed2e216a9c61aabf1f1cac41972b1a4e96a91a
diff --git a/dev/js/src/hint/menu.js b/dev/js/src/hint/menu.js
index 89f1d10..b28c03a 100644
--- a/dev/js/src/hint/menu.js
+++ b/dev/js/src/hint/menu.js
@@ -5,12 +5,12 @@
"use strict";
define([
- 'menu',
+ 'containermenu',
'hint/item',
'hint/prefix',
'hint/lengthField'
], function (
- menuClass,
+ containerMenuClass,
itemClass,
prefixClass,
lengthFieldClass) {
@@ -21,13 +21,11 @@
* Create new hint helper menu.
*/
create : function (hint, context, params) {
- const obj = Object.create(menuClass)
- .upgradeTo(this)
- ._init(params, {
- itemClass : itemClass,
- prefixClass : prefixClass,
- lengthFieldClass : lengthFieldClass
- });
+ const obj = containerMenuClass.create(params, {
+ itemClass : itemClass,
+ prefixClass : prefixClass,
+ lengthFieldClass : lengthFieldClass})
+ .upgradeTo(this);
obj._context = context;
obj._el.classList.add('hint');
obj._hint = hint;
diff --git a/dev/js/src/hint/prefix.js b/dev/js/src/hint/prefix.js
index 1a673f8..7f4d300 100644
--- a/dev/js/src/hint/prefix.js
+++ b/dev/js/src/hint/prefix.js
@@ -18,6 +18,7 @@
const m = this.menu();
const value = this.value();
const h = m.hint();
+
h.inputField().insert(value);
h.active(null);
m.hide();