I have string text field, I want to pop up look up upon hitting [enter] or [tab] keys
Like
1 comments
21:23 Sep 18, 2018
It will be hard to catch the [tab] click event. The problem is that the [tab] key is reserved for changing an active element in a browser.
The [Enter] key will be easy to catch. I would do the following:
define("ContactPageV2", [], function() { return { entitySchemaName: "Contact", attributes: {}, modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/, details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/, businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/, methods: { onEntityInitialized: function() { this.callParent(arguments); }, onPhoneClick: function(e) { if (e && e.keyCode === 13) { console.log("show popup"); } } }, dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/, diff: /**SCHEMA_DIFF*/[ { "operation": "merge", "name": "AccountPhone", "values": { "layout": { "colSpan": 24, "rowSpan": 1, "column": 0, "row": 4 }, "keyup": { "bindTo": "onPhoneClick" } } } ]/**SCHEMA_DIFF*/ }; });
Show all comments