Skip to content

fixes #2532134 in datatable sort #281

merged 4 commits into from Jan 11, 2013

6 participants


Fixed case sensitive sort order for string columns in datatable. Added test to cover data table containing Date, Number and String data types with case sensitive sort available by setting a caseSensitive param to true on the table column.

Setting a column with caseSensitive param to true e.g...

{key:"Company", label:"Sortable string (case sensitive)", sortable:true, caseSensitive:true}

Will force case sensitive sorting, the default being case insensitive.

@clanceyp clanceyp fixes #2532134 Added sort test to cover Date, Number and String data …
…types with case sensitive sort available by setting a caseSensitive param to true on the table column.
lsmith commented Sep 25, 2012

Love it! Thanks for taking care of this. Since the compare function will be executed a lot, especially on large data sets, I'd prefer to replace `Y.Lang.isString(...)calls withtypeof` checks to avoid the function hops.

Otherwise, could you add an entry to the file?


@ericf, should this be merged to master or 3.x?

@clanceyp clanceyp ref #2532134 Changed Y.Lang.isString() to typeof() === 'string' to im…
…prove performance, and added comment to component history.
lsmith commented Sep 25, 2012

You can document it on the user guide located in src/datatable/docs/index.mustache

Specifically, I'd add a note here: and the config entry here:

YUI Library member
ericf commented Sep 25, 2012

@lsmith This seems like it should go into master. I can merge it in after the final sign off.

YUI Library member
ericf commented Sep 25, 2012

@clanceyp Have you signed the YUI CLA? If not it would be great if you could:

Also, let me know once you've signed it. Thanks.

What Is the Purpose of the CLA?

The CLA ensures that everyone who submits a work of authorship to the YUI Library is contributing work that is their own or for which they can authoritatively speak. This protects the tens of thousands of developers who use YUI in their daily work, all of whom rely on YUI's BSD license to appropriately cover their use of the library.

The CLA does not transfer title or copyright of your contributed work to Yahoo!. It merely guarantees that you approve the use of your work within YUI and by those who use the library under the terms of its license.

YUI Library member
jenny commented Sep 28, 2012

Hi Patrick,

We've gone digital with our CLA. Would you mind resubmitting it here:


@ericf ericf was assigned Sep 28, 2012
lsmith commented Nov 7, 2012

Ship it!

@apipkin apipkin was assigned Dec 4, 2012
@yuibuild yuibuild merged commit 85557a2 into yui:master Jan 11, 2013

1 check passed

Details default The Travis build passed
@apipkin apipkin was unassigned by jlecomte Mar 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.