Results 1 to 10 of 10

Thread: tagfield, issues with forceSelection: false and typing new text

    You found a bug! We've classified it as EXTJS-17645 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Touch Premium Member
    Join Date
    Mar 2012
    Posts
    115

    Default tagfield, issues with forceSelection: false and typing new text

    HI,

    ExtJs 5.0.2

    I'm using a tag field to handle email selection in a form, the field is bound to a store but I want to allow free typing on additional emails. Originally I could not use free typed emails, has you finished typing the email would disappear.

    I added an override to the find record method and that has allowed me to free type new emails however has you start to type an email that is found in the store, you get the correct email address from the store plus the what you started to type.

    Also how do you stop chrome from trying to auto complete the form.

    Code:
    element = {
    	xtype: 'tagfield',
    	localName: 'emailto',
    	name: 'toemail',
    	store: emailToStore,
    	fieldLabel: ioMailXML.data.lblMailTo,
    	delimiter: ',',
    	multiSelect: true,
    	createNewOnBlur: true,
    	createNewOnEnter: true,
    	forceSelection: false,
    	typeAhead: true,
    	queryMode: 'local',
    	labelSeparator: lblSeparator,
    	displayField:'email',
    	valueField: 'email',
    	autocomplete: 'off',
    	itemSelector: 'div.x-combo-list-item',
    	listConfig        : {
    		getInnerTpl: function() {
    			return '<div class="x-combo-list-item" >{name} ({email})</div>';
    		}
    	},
    	pageSize: false
    }
    emailForm.add(element);
    Code:
    Ext.define("Overrides.TagField", {
        override: "Ext.form.field.Tag",
    
    
    	findRecord: function(field, value) {
            var store = this.store, record;
            if (store) {
                store.each(function(rec) {
                    if (rec.isEqual(rec.get(field), value)) {
                        record = rec;
                        return false;
                    }
                });
            }
            return record || false;
        }
    });
    Screen Shot 2015-04-27 at 9.26.45 AM.png


    Thanks

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    If you are using Ext JS 5.0.2, I would recommend switching to a stable release. 5.0.2 was never released as it eventually became 5.1.0. You might try that release since there were a few tagfield bugs fixed in that one.

    Not sure what can be done with Chrome's autocomplete. One can set the 'autocomplete' tag to 'off' on the form if one is using standardSubmit (creating real form tags), but it appears that Chrome isn't honoring that setting anymore.

  3. #3
    Touch Premium Member
    Join Date
    Mar 2012
    Posts
    115

    Default

    HI,I upgraded my sencha command then upgraded the app. I removed my over loaded method and tested.I have a similar issue but slightly different. Has I type the name "aaron", there are two email address starting with Aaron, the combo box open showing both and the first email address is auto completed. I then choose the second email address in the list and it adds both, the first one that auto completed and the one I choosethanks'

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Are you able to recreate this is a Fiddle?
    https://fiddle.sencha.com/#home

  5. #5
    Touch Premium Member
    Join Date
    Mar 2012
    Posts
    115

    Default

    Yes I was able to reproduce, https://fiddle.sencha.com/#fiddle/mb3.

    Start to type aa and it will narrow the list down. Select the third email with your mouse and it will add both the first and second email.

    Need to able to select multiple address from the store and free type new ones.

    thanks

    harry

  6. #6
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Seems like a bug to me. I'll move this thread over to the Bugs forum.

  7. #7
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

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

  8. #8
    Touch Premium Member
    Join Date
    Mar 2012
    Posts
    115

    Default

    I know you have your processed and the bug needs reviewing but I need to set customer expectations, any rough idea on eta for fix or workaround. Week, month?thanks

  9. #9
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Unfortunately, we don't currently give estimates for bug fixes. This one is so fresh it's not been prioritized by Engineering yet, so at this point I can't even offer a guess based on settings.

  10. #10
    Sencha User
    Join Date
    Jan 2011
    Posts
    7

    Default

    Any update on this bug? It is present in 6.2 as well

Similar Threads

  1. [FIXED] Tagfield with allowblank false always returns errors
    By joepitz in forum Ext 5: Bugs
    Replies: 1
    Last Post: 25 Mar 2015, 11:49 AM
  2. [FIXED] Combo auto-reset while typing with query and forceSelection
    By Lukappa in forum Ext 5: Bugs
    Replies: 6
    Last Post: 17 Oct 2014, 12:41 PM
  3. ComboBox.forceSelection still allows typing
    By DavidThi808 in forum Sencha Ext JS Q&A
    Replies: 4
    Last Post: 25 Oct 2013, 3:18 PM
  4. forceselection: false and valuefield
    By Tim Toady in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 9 Aug 2010, 4:59 AM
  5. combobox / forceselection:false / listener?
    By flohoff in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 10 Apr 2009, 2:53 AM

Posting Permissions

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