I having trouble getting allowCustomValue behavior to work correctly on the igcombo in 2016.2. There are 2 issues:
1. If the combo contains a value say ABCD and i want to add the custom value ABCD2 then it displays the message no matching records and clears off the combo. I can add WXYZ. So i need it to not match the data source.
2. The entered custom text doesnt work with ko binding. In the below example, I am expecting _selectedLot to get updated even when a custom text is entered but that doesnt work.
igCombo: {width: '100%', height: '25px', caseSensitive: false, compactData: false, dataSource: someArray , placeHolder: ' ', highlightMatchesMode: 'multi', hideEnterKey: false, selectionChanged: lotSelectionChangedEvent, selectedItems: _selectedLot,tabIndex:-1, selectedItemType : 'object', itemTemplate: '<div class=\'comboTemplate\'><div class=\'comboInfo\'><span class=\'emphasizedText\'>{{Lot}}</span></div></div>', textKey: 'Lot', valueKey: 'Lot', mode: 'editable', allowCustomValue: true}
is this still the best way to get the custom value though?
let element = $("#avilablelotDS").igCombo("textInput"); this._customLot = (element)[0].value;
Hello Deepti,
Your _selectedLot won't update since the custom value is not in the view model/data source. Since our KO bindings are set to the selectedItems rather than to the combo input directly, you will need to manually set the custom value from the combo input in the selectionChanged event (the ui.items array will be empty).
If you have any further questions or concerns with this, please let me know.
Issue 2: When I use a custom value I expect it to bind to the model _selectedLot but after entering a custom value _selectedLot is still empty and i have to retrieve the custom value using the following code.
let element = $("#avilablelotDS").igCombo("textInput"); this._customLot = (<HTMLInputElement>element)[0].value;
Thank you for posting in our forums!
I am able to reproduce the behavior of issue #1 and can see a difference in behavior when not using knockout.
I have created a support case for you with an ID of CAS-180484-S8V9T3. The matter has been determined to be a development issue and has been logged in our tracking system with ID: 231070.
I will leave this case open and update you with any new information. You can view the status of the development issue connected to this case by going to the “Account” tab on our website, selecting "My Support Activity" and then this support case will be listed there. Then, you may select the "Development Issues" tab to view details of this development issue.
For issue #2, Do you mean that the _selectedLot is not removing previously matched items from the viewmodel? Please provide a detailed example, including steps to reproduce, of the behavior your are seeing and the result you are expecting to see.
Please let me know if you have any questions.