-
9 Mar 2012 12:49 PM #1
ComboBox and assertValue
ComboBox and assertValue
Hello there,
Having forceSelection: true & multiSelect: false on a combo, when there is more than one record with the same display field value, the assertValue function always re-select the first one, no matter which record (with the same display field value) you select.
The problem is that assertValue is using 'findRecordByDisplay'
the change event has the correct newValue, the problem is that the assertValue modify it to another value (the first one with that display value)Code:... rec = me.findRecordByDisplay(value); if (rec) { me.select(rec); } ...
I know its not very common to have more than one record with the same display value (obviously the records have different id values)... In my case, I hit this problem with people, it's possible that more than one person is named the same, and they represent different records.... (in my system they are easily differentiable because I'm using a custom innerTpl that not only shows the person name, but also its email, if it's an employee or a contact and it's avatar)
Currently, I'm overriding the combobox to avoid the me.select(rec), and it works OK for me... but I guess it would be better if I didn't have to include that override...
-
9 Mar 2012 2:03 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
Not common but a possibility. Thanks for the report.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
You found a bug! We've classified it as
EXTJSIV-5565
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote