Results 1 to 7 of 7

Thread: Ext.data.Field.sortDir is not implemented

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-10388 in 5.1.0.47.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      0  

    Default

    Hi Mitchell,

    Could you clarify a field's sortDir option is supposed to do something or not? I am searching for "sortDir" in ext-all-debug.js and, seems, it is not used anywhere.

    Seems, I see the place where it could be used, see the red text.

    Ext.util.Sortable decodeSorters
    Code:
    decodeSorters: function(sorters) {
        if (!Ext.isArray(sorters)) {
            if (sorters === undefined) {
                sorters = [];
            } else {
                sorters = [sorters];
            }
        }
    
        var length = sorters.length,
            Sorter = Ext.util.Sorter,
            fields = this.model ? this.model.prototype.fields : null,
            field,
            config, i;
    
        for (i = 0; i < length; i++) {
            config = sorters[i];
    
            if (!(config instanceof Sorter)) {
                if (Ext.isString(config)) {
                    config = {
                        property: config
                    };
                }
    
                Ext.applyIf(config, {
                    root     : this.sortRoot,
                    direction: "ASC"
                });
    
                    
                if (config.fn) {
                    config.sorterFn = config.fn;
                }
    
                    
                if (typeof config == 'function') {
                    config = {
                        sorterFn: config
                    };
                }
    
                    
                if (fields && !config.transform) {
                    field = fields.get(config.property);
                    config.transform = field && field.sortType !== Ext.identityFn ? field.sortType : undefined;
                }
                sorters[i] = new Ext.util.Sorter(config);
            }
        }
    
        return sorters;
    }
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Yes, I'm not seeing it actually being used anywhere.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      0  

    Default

    Thank you for the answer.

    Can it being considered as a bug? I think yes. If you agree, I can post a new bug report. Though, this thread looks appropriate to be a bug report itself.
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      1  

    Default

    If it's in the docs and not in the source then it's a bug. It will be up to the dev team if it should be removed from the docs or actually implemented. Looking at the 4.0.0 source, looks like it was never implemented.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

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

  6. #6
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      1  

    Default

    Thank you, Mitchell. It is nice to deal with you, as always
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  7. #7
    Sencha User
    Join Date
    Jun 2008
    Posts
    138
    Vote Rating
    7
      1  

    Default

    This looks like a simple bug to fix. Any reason why 4 months later, it's still open? The OP provided where the fix should go...

Posting Permissions

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