Coder Social home page Coder Social logo

Comments (4)

RobertoPrevato avatar RobertoPrevato commented on June 8, 2024

Hi @binary64, thanks for your kind words and for the heads up! I am taking a look at this bug right now - I write again once it's fixed.

from kingtable.

RobertoPrevato avatar RobertoPrevato commented on June 8, 2024

@binary64, I fixed the bug (was a silly mistake), please download again the library and let me know if I can close this issue. :)

from kingtable.

binary64 avatar binary64 commented on June 8, 2024

Hi many thanks for the update. I have tried the update, but it's worse. It's sorting based on the number within the string, but not the whole string itself, eg:-

Reno911
42-Universe
7_Ducks
X2
A1

from kingtable.

RobertoPrevato avatar RobertoPrevato commented on June 8, 2024

Hi again,
Please change this configuration, to obtain the desired result:

KingTable.ArrayUtils.options.autoParseNumbers = false;

I made this configurable (and default) because other people were recommending the opposite: for example they were returning amounts of money together with currency ("100.30 PLN", "1000 PLN", "200 PLN") or percentages ("10%", "50%", "100%") and were expecting the sorting function to sort using the number within the string. In the first version of the library I shared your same point of view, and expected that strings should be sorted like strings, numbers like numbers - but speaking with many people I found that both points of view make sense. The piece of code responsible of this thing is here.

from kingtable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.