Unplanned
Last Updated: 06 Jul 2022 07:05 by ADMIN
Jason
Created on: 27 Sep 2017 15:46
Category: Grid
Type: Feature Request
19
Be able to overrride compare method in kendo-data-query sort-array.operator
We need to be able to overrride "compare" method in kendo-data-query sort-array.operator.  We are using your processData for client side sorting but need to change the "compare" method since we have decimal values already formatted in our objects.  Since they are formatted they are technically strings and sorted as such.  Currently we had to rip out your processData and call our custom version with a compare method like so:

const compare = (a, b) => {
    if (isBlank(a)) {
        return a === b ? 0 : -1;
    }

    if (isBlank(b)) {
        return 1;
    }

    let a1 = a;
    if (isNumber(a)) {
        a1 = toNumber(a);
    } else if (isDate(a)) {
        a1 = ensureDate(a);
    }

    let b1 = b;
    if (isNumber(b)) {
        b1 = toNumber(b);
    } else if (isDate(b)) {
        b1 = ensureDate(b);
    }

    if (a1.localeCompare) {
        return a1.localeCompare(b1);
    }

    return a1 > b1 ? 1 : (a1 < b1 ? -1 : 0);
};
4 comments
ADMIN
Silviya
Posted on: 06 Jul 2022 07:05

Hello, Cyrill,

Sure, no problem.

Have a great day at work!

Regards,
Silviya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Cyril
Posted on: 29 Jun 2022 11:52
Great, thanks for the heads up Silviya!
ADMIN
Silviya
Posted on: 29 Jun 2022 11:12

Hi Cyril,

Indeed, the feature request is recognized as valid, and based on votes seems to be popular.

I will raise it for discussion within the development team.

In general, we are monitoring the demand for each logged feature request, and based on multiple factors such as votes, business value, resources, and others we decide which feature to prioritize. I can't share an exact timeline on when the functionality will be available. Usually, tracking our roadmap can give an idea of what we are currently working on.

Regards,
Silviya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Cyril
Posted on: 22 Jun 2022 14:27

Hello,

This feature request has been open for almost 5 years. It would be very useful for our use case, otherwise we would have to develop complex and hard-to-maintain code.

We already shared additional details (see internal ticket #1516595), but it would be nice to have a feedback from Kendo on this feature (it's the fourth most requested feature :) )

 

Thanks