PDA

View Full Version : Help with differences in combobox modern vs classic



ddiguru
19 Feb 2020, 9:18 AM
I'm writing a Universal Application using both classic and modern toolkits using version ExtJS 7.1.0.46. I've come across an odd behavior when using the combobox.

Classic displays properly:
58176

Modern does not:
58178

Both comboboxes are set up similarly and have the same store from the shared viewModel. The JSON response is the same for both as well.




[
{
"_ref": "view/ZG5zLnZpZXckLl9kZWZhdWx0:default/true",
"is_default": true,
"name": "default"
}
]


Thoughts?

praveensaini23
21 Feb 2020, 3:33 AM
Hi ddiguru (https://www.sencha.com/forum/member.php?748723-ddiguru) ,
Seems like in modern toolkit, somehow the html is broken. If this problem is not solved yet, Can you provide source code of that modern toolkit combo with the data for which its not working ?
If you can provide fiddle url where is not working, It will be easy to fix this problem.

ddiguru
21 Feb 2020, 6:17 AM
Hi! Thanks.

I tried duplicating this in Fiddle but I've never really played in there... so my skills on recreating everything "as is" are lacking.

https://fiddle.sencha.com/#view/editor&fiddle/33th

I don't know how to duplicate a remote call using Fiddle. Do you have it call a data/data1.json file or something like that? Just not sure how that works.

My original code for the modern combobox in my app is identical to the code in the Fiddle except it's a remote call:



items: [{
xtype: 'toolbar',
docked: 'top',
items: [{
xtype: 'combobox',
label: 'DNS View',
valueField: '{name}',
displayField: '{name}',
queryMode: 'remote',
queryParam: '',
bind: {
store: '{views}'
},
value: 'default'
}]
}]


NOTE: i've since removed that toolbar as it was a less than optimal way of doing what i was trying to do. Now, I'm more curious than anything else.

praveensaini23
21 Feb 2020, 6:48 AM
I changed the store to remote in below fiddle -
https://fiddle.sencha.com/#view/editor&fiddle/33tl

but your original problem is not related with local/remote store. Can you reproduce that problem in jsfiddle ?

praveensaini23
21 Feb 2020, 6:58 AM
updated fiddle -
https://fiddle.sencha.com/#view/editor&fiddle/33tm

it seems working fine with remote store as well.

ddiguru
21 Feb 2020, 7:07 AM
Interesting... Thanks for the effort, but i'm guessing it was just something odd in the overall code, that we're not able to duplicate here. As i mentioned, i've moved on, and i'm using DNS views model and store in a different way w/o any issues in both classic and modern.

thanks for the effort!

Cheers