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!
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.
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.
Thank you for looking into this. I’ll be sure to update come April 8th.
We are glad to inform you that the fix is now available in the updated version of
sortingMethod should work as expected.
You are welcome to update the component.
Here is a link: https://www.npmjs.com/package/@types/flexmonster