Just updated to 2.7 and now sortingMethod is supposed to return a boolean?

Answered
Jon asked on March 18, 2019

Hi there,
I just updated my Flexmonster libraries to 2.7.1 and a method that was previously working beautifully has had its signature changed, I think. Previously I had been using the "sortingMethod" method to set a precise order that certain column values come in as (not alphabetical or anything, purely custom). That initial function returned a number value. Now, I have errors in my code saying that the return value should be boolean? And the docs still seem to be saything that the return value should be a number so I'm a bit confused. How do I, with my SASS Angular flexmonster project, get "sortingMethod" going with a custom order array now? (Image has previously working code.)
Thanks for your help!

4 answers

Public
Vera Didenko Vera Didenko Flexmonster March 19, 2019

Hello, Jon,

Thank you for writing to us and for providing us with a screenshot.

In the version 2.7.0, the sortingMethod returns a numeric value just like before.
We tried to reproduce the error you have encountered, but everything works fine on our side.
Please see the JSFiddle example.

Please send us a sample or JSFiddle example where the error is reproducible, so we may help you solve the problem.

We are looking forward to hearing from you.

Best Regards,
Vera

Public
Vera Didenko Vera Didenko Flexmonster March 19, 2019

Hello, Jon,

We took another look at the problem you described and found the cause:
the issue is in our Angular wrapper in the index.d.ts file.
Here is a link to the sortingMethod in the index.d.ts file from our GitHub repository.

We will correct it and the fix will be available in the minor release with the ETA April 8.

Meanwhile, you can change the return type from boolean to number in your copy of the file which is included in your project. 

Please let us know if this works for you.

Best Regards,
Vera

Public
Jon March 21, 2019

Hi Vera,
Thank you for looking into this. I'll be sure to update come April 8th.
Thanks,
Jon

Public
Vera Didenko Vera Didenko Flexmonster April 10, 2019

Hello, Jon,

We are glad to inform you that the fix is now available in the updated version of @types/flexmonster.
Now the sortingMethod should work as expected.
 

You are welcome to update the component.
Here is a link: https://www.npmjs.com/package/@types/flexmonster

 
Best Regards,
Vera

Please login or Register to Submit Answer