Results 1 to 4 of 4

Thread: Is possible for Multiselect set prefix for each value?

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    Estonia
    Posts
    198
    Answers
    2
    Vote Rating
    1
      0  

    Default Is possible for Multiselect set prefix for each value?

    Subject. I want add prefix for final value if selected by another check/radio I have tried
    Code:
                              xtype:'multiselect',                                        listeners:{
                                                change:function (element, newValue, oldValue) {
                                                    if (Ext.getCmp('min-choose').getValue()) { 
                                                        console.log('In:' + newValue);
                                                        element.suspendEvents();
                                                        element.setValue('*/'+ newValue);
                                                        element.resumeEvents();
                                                    }
    
    
                                                    console.log('new:' + newValue + ' OldValue:' + oldValue);
                                                }
                                            }
    It doesn't work well I have a lot of calls for the 'change'

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,070
    Answers
    3976
    Vote Rating
    1394
      0  

    Default

    So each row that is selected you want a prefix to them?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    Estonia
    Posts
    198
    Answers
    2
    Vote Rating
    1
      0  

    Default

    exactly

  4. #4
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,070
    Answers
    3976
    Vote Rating
    1394
      0  

    Default

    If it's going to be the same in all records then you can use the convert method in the model. Or you can iterate through the values to add it. You can extend it and override the getValues method
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •