Thank you for reporting this bug. We will make it our priority to review this report.
Combo bug when displayFields == valueField
Combo bug when displayFields == valueField
Ext version tested:
Browser versions tested against:- Firefox 36.0 (Firebug 2.0.8 installed) - windows 7
- Firefox 34.0 (Firebug 2.0.8 installed)
- Chrome 40.0.2214.115
DOCTYPE tested against:
Description:- NB: Despite having a consistent example I'm still not sure of the cause/effect of this...to be honest I'm not even sure if this is one bug or two bugs
- It seems that when you have a combobox where the displayField is the same as the valueField, it causes issues when binding a remote store and value. The order of the binding config has no effect on this bug (so it doesn't seem to be a dup of http://ift.tt/1AnRskU )
- In the fiddle below you'll see store with a remote proxy, which uses the Fruit model, used in 2 combo boxes
- In the first box, the display and value fields are different, the 2nd has them the same, but only the first box works correctly
(This next section might be a separate bug, or a clue for this one, let me know if I should make separate threads for it):Other notes:
- If I take forceSelection off the 2nd combobox, I get an error in my console: Uncaught TypeError: undefined is not a function
- It occurs in the "doSetValue" function of combobox at this line (1783 of the Combobox source file, inside the if !forceSelection block)):
HTML Code:
record = new Model(dataObj);
Steps to reproduce the problem:
The result that was expected:
- Both combo boxes should produce the same result (displaying 'Orange'), because the store's data has "name" and "value" as the same string
The result that occurs instead:- The combobox where the display and value fields are the same fails to display the correct result
Potential Workaround:- Changing line 1729 of the source file from
HTML Code:
if (value != null && !displayIsValue && (pendingLoad || unloaded || !isLoaded || store.isEmptyStore)) {- to
HTML Code:
if (value != null && (pendingLoad || unloaded || !isLoaded || store.isEmptyStore)) {- seems to fix the issue, but there may be a better fix that I can't find
Combo bug when displayFields == valueField
Aucun commentaire:
Enregistrer un commentaire