[FIXED] [#1206] [3.3] TagField control getValue() issue when adding custom values

Page 2 of 2 FirstFirst 12
  1. #11
    Hi Daniil/Fabricio,
    we applied the patch by merging the SVN changeset but it looks like that only pressing "ENTER" is now fine whereas pressing "TAB" after manually inserting a new item on the tagfileld produces strange issues:

    1) Trying using ONLY THE "TAB" key, "getValue()" still returns a single item (wrong).

    2) Trying both ENTER and then TAB it throws an error on the client that breaks the layout (meaning that the app is not usable anymore).
    "cannot read property 'internalId' of undefined."

    Thank you for hlep,
    Cheers
  2. #12
    Thank you for the feedback! I'll investigate the issues that you've reported.
  3. #13
    Hi Fabricio/Daniil,

    We had chance to update Ext.Net 3.x to the latest SVN release, but the issue still persists (I mean that getValue() retrieves wrong items when using the "tab" key to insert new tag values).

    Cheers
  4. #14
    Hello Adriano,

    Thank you very much for the feedback!

    I apologize for the delay in fixing that - so many things were being done with Ext.NET v4. I will get this task higher in my TODO list.
  5. #15
    Thank you Daniil!
  6. #16
    Created an Issue:
    https://github.com/extnet/Ext.NET/issues/1278

    Fixed in both - v3 and v4.

    While it is fixed in the sources, here is an override to test it quickly if you want.

    Fix
    Ext.net.TagField.override({
        assertValue: function () {
            var me = this,
                value = me.inputEl ? me.inputEl.dom.value : "",
                rec;
    
            if (me.createNewOnBlur && value) {
                if (me.encodeOnCreate) {
                    value = Ext.String.htmlEncode(value);
                }
    
                rec = me.findRecordByDisplay(value);
                this.creatingOnBlur = true;
                me.store.clearFilter(); // #1278
    
                if (rec) {
                    this.addTagToInput(rec);
                }
                else if (!me.forceSelection) {
                    this.addTagToInput({ text: value, value: value });
                }
                this.creatingOnBlur = false;
            }
    
            me.inputEl.dom.value = '';
            if (this.tagLabel) {
                Ext.defer(function () {
                    this.tagLabel.ulEl.appendChild(this.tagLabel.inputLi);
                }, 1, this);
            }
            me.collapse();
        }
    });
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 12
    Last Post: Jul 28, 2015, 10:11 AM
  2. Replies: 9
    Last Post: Mar 13, 2014, 3:30 PM
  3. Adding control values to the grid
    By Vaishali in forum 1.x Help
    Replies: 0
    Last Post: Apr 17, 2012, 11:55 AM
  4. [CLOSED] Adding events to custom control
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 29, 2012, 8:16 PM
  5. Replies: 2
    Last Post: Jan 09, 2012, 7:18 AM

Posting Permissions