mdbTable does not sort when property value is NULL.


Topic: mdbTable does not sort when property value is NULL.

The mdbTable does not sort correct when having property values that is NULL.

When debugging, the following (compare) function will return 0 if a value is NULL.

 function (a, b) {
        /** @type {?} */
        var i = 0;
        while (i < key.length) {
            a = a[key[i]];
            b = b[key[i]];
            i++;
        }
        if (a < b) {
            return _this.sorted ? 1 : -1;
        }
        else if (a > b) {
            return _this.sorted ? -1 : 1;
        }
        else {
            return 0;
        }
    }));

Damian Gemza staff answered a year ago

Dear Peter,

Thanks for your report. We'll take a look at this problem, but I can't provide you with any ETA on this.

As a workaround, please write your own sort function, and use it in your project.

Best Regards,

Damian


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: Angular
  • MDB Version: 7.4.2
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No