2

I'm making an app in Modern with SA 4 using ExtJS 6.2.0. I got a store with world wide currencies. In the display field I'd like to show currency abbreviation and in the picker list I'd like to show full currency name.

You can do that in the classic combobox with "listConfig" property but I'm wondering if there is a modern selectfield hack that anyone made that can do this?

Cheers, Aghi

Aghi
  • 119
  • 3
  • 13

1 Answers1

2

The Picker uses Ext.picker.Slot which has the displayField and valueField configs.

var picker = Ext.create('Ext.Picker', {
slots: [
    {
        name : 'limit_speed',
        title: 'Speed',
        displayField: 't',
        valueField: 'v',
        data : [
            {t: '50 KB/s', v: 50},
            {t: '100 KB/s', v: 100},
            {t: '200 KB/s', v: 200},
            {t: '300 KB/s', v: 300}
        ]
    }
]

});

bluehipy
  • 2,254
  • 1
  • 13
  • 19
  • Super! That worked like a charm. YYou are a life saver. I've put it under defaultPhonePickerConfig and it works elegantly. – Aghi Mar 09 '17 at 13:14