Hi there,
we are trying to build a search for different views. Each view has a title, icon and description.
If the user is typing we want to display the current matches, but the user should also have the ability to enter a word and start a search to see the result page. If the user directly selects an item and hit enter, the view should be opened.
This example nearly matches our use-case, but if you type "add" and hit enter the first result will get selected and will be sent as input to the server insted only the entered words.
I know this is the documented behaviour.
Is there any useable workaround to get this to work? Maybe a flag we can set that after an input the selection is not set to to the first record of the valuemap?
code to try it out by yourself
Best regards
we are trying to build a search for different views. Each view has a title, icon and description.
If the user is typing we want to display the current matches, but the user should also have the ability to enter a word and start a search to see the result page. If the user directly selects an item and hit enter, the view should be opened.
This example nearly matches our use-case, but if you type "add" and hit enter the first result will get selected and will be sent as input to the server insted only the entered words.
I know this is the documented behaviour.
Is there any useable workaround to get this to work? Maybe a flag we can set that after an input the selection is not set to to the first record of the valuemap?
code to try it out by yourself
Code:
isc.DynamicForm.create({ ID: "testForm", width: 500, "saveOnEnter": true, "submit": function () { console.log(this.getItem("itemName").getSelectedRecord()) }, items: [{ name: "itemName", title: "Search", editorType: "ComboBoxItem", valueField: "itemID", "textMatchStyle": "substring", "allowEmptyValue": true, "addUnknownValues": true, "selectOnFocus": true, optionDataSource: "supplyItem", width: 250, pickListCellHeight: 50, pickListProperties: { canHover: true, showHover: true, cellHoverHTML: function (record) { return record.description ? record.description : "[no description]"; }, formatCellValue: function (value, record, field, viewer) { var descStr = record.description ? record.description : "[no descripton]"; var styleStr = "font-family:arial;font-size:11px;white-space:nowrap;overflow:hidden;"; var retStr = "<table>" + "<tr><td ><span style='" + styleStr + "width:170px;float:left'>" + record.itemName + "<span></td>" + "<td align='right'><span style='" + styleStr + "width:50px;float:right;font-weight:bold'>" + record.unitCost + "<span></td></tr>" + "<tr><td colSpan=2><span style='" + styleStr + "width:220px;float:left'>" + descStr + "</span></td></tr></table>"; return retStr; } } } ] });
Comment