Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: TagField setValue not showing value for multiSelect [ExtJS 6.0.0]

    You found a bug! We've classified it as EXTJS-19078 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    122

    Default TagField setValue not showing value for multiSelect [ExtJS 6.0.0]

    Hi there,

    I am creating a form with tag fields and I have two problems:

    1) The labelTpl I am setting is not evaluated, how is it suppose to work that property?
    2) The setValue for the multiSelect box does not show the value.

    This is a sample of the code that you can put in a viewport for example
    Code:
    Ext.define('TutorialApp.model.SimpleModel', {
        extend: 'Ext.data.Model',
        fields: [
            { name: 'elementId',   type: 'string' },
            { name: 'label',       type: 'string' }
        ]
    });
    // put this form in a panel or somewhere, I had it in the main panel of the default app 
    // that gets created with Sencha Command
    {            xtype : 'form',
                items: [
                {
                    xtype: 'tagfield',
                    fieldLabel: 'Multiselect',
                    multiSelect : true,
                    allowBlank : false,
                    itemId : 'tagField1',
                    labelTpl : '<a href="www.google.com">{label}</a>',
                    store: Ext.create('Ext.data.Store',
                    {
                        model : 'TutorialApp.model.SimpleModel'
                    }),
                    displayField: 'label',
                    valueField: 'elementId',
                    // filterPickList: true,
                    queryMode: 'local'
                }, {
                    xtype: 'tagfield',
                    fieldLabel: 'Single select',
                    multiSelect : false,
                    allowBlank : false,
                    labelTpl : '<a href="www.google.com">{label}</a>',
                    itemId : 'tagField2',
                    store: Ext.create('Ext.data.Store',
                    {
                        model : 'TutorialApp.model.SimpleModel'
                    }),
                    displayField: 'label',
                    valueField: 'elementId',
                    queryMode: 'local',
                },
                {
                    xtype : 'button',
                    text : 'Load tagfields',
                    handler : function(){
                        var tagField = Ext.ComponentQuery.query('tagfield'),
                            form = Ext.ComponentQuery.query('form')[0];
                        Ext.Array.each(tagField, function(f){
                            console.log(f.itemId);
                            f.setValue([Ext.create('TutorialApp.model.SimpleModel',
                            {
                                elementId : 'element' + parseInt(Math.random() * 1000),
                                label : 'Element 1' + parseInt(Math.random() * 1000)
                            })]);
                        });
                        form.getForm().checkValidity();
                    }
                }
    See fiddle: https://fiddle.sencha.com/#fiddle/18mk

    Thanks in advance!
    Last edited by A. Llorente; 14 Apr 2016 at 4:43 AM. Reason: Added fiddle

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    122

    Default

    No one knows how to set the value for a multiSelect Tag field?

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    122

    Default

    So in 5 days nobody had time to look at this?

  4. #4
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  5. #5
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    122

    Default

    Thanks

  6. #6
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    122

    Default

    Is there any news on the status of this bug? I expected it in 6.0.1 but it was not there. It is very important for us that this works correctly, at this moment we cannot show the values in edit mode!

  7. #7
    Sencha Premium Member
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    35

    Default

    No workaround available?

  8. #8
    Sencha Premium Member
    Join Date
    Apr 2015
    Posts
    122

    Default

    It hasn't been included in 6.0.2 as far as I know.

    Apparently having the field broken is not important enough. Also the tpls are broken for the second field. I created a fiddle with both problems mentioned in the original post:
    https://fiddle.sencha.com/#fiddle/18mk

  9. #9
    Sencha Premium Member
    Join Date
    Aug 2010
    Location
    Germany
    Posts
    35

    Default

    Thanks A. Llorente, this is exactly the same bug which I have also in my application, but no solution is available since August 2015..... The tagfield in Sencha 6 is quite buggy!

  10. #10

    Default

    Any News?
    http://www.dev4.life - Software Development Blog

Page 1 of 2 12 LastLast

Similar Threads

  1. setValue not working for multiselect combo
    By evs.saad in forum Ext: Discussion
    Replies: 2
    Last Post: 21 May 2013, 4:04 AM
  2. Replies: 3
    Last Post: 23 Jul 2012, 6:17 AM
  3. Replies: 4
    Last Post: 26 Sep 2011, 12:34 AM
  4. multiselect setValue problem
    By Dwagar in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 9 Mar 2010, 1:45 PM

Tags for this Thread

Posting Permissions

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