Ticket #2531130 (closed defect)

Reporter


Peter Peterson
Opened: 09/21/11
Last modified: 05/10/12
Status: closed
Type: defect
Resolution: fixed

Owner


Luke Smith
Target Release: 3.5.0
Priority: P3 (normal)
Summary: Custom sort functions on Datatable do not work
Description:

The Column class does not expose the sortFn attribute, so any custom sort function set up in the column set will not be utilized.

Adding Y.Column.ATTRS.sortFn = {}; to code is a temporary workaround.

Type: defect Observed in Version: 3.4.0
Component: DataTable Severity: S3 (normal)
Assigned To: Luke Smith Target Release: 3.5.0
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Add a sortFn parameter to a columnset definition when creating a datatable. Setting a breakpoint or Y.log in this function will demonstrate the function not being called.

Change History

Luke Smith

YUI Contributor

Posted: 09/21/11
  • location changed to Library Code
  • milestone changed to 3.5.0
  • priority changed to P3 (normal)
  • status changed from new to accepted

Luke Smith

YUI Contributor

Posted: 09/21/11
  • estimated changed from 0 to 0.1
  • remaining changed from 0 to .1

Luke Smith

YUI Contributor

Posted: 12/14/11
  • estimated changed from 0.1 to 1
  • remaining changed from 0.1 to 1
  • sprint changed to sprint 2

I've changed how columns are represented in the new DataTable architecture. They are simple objects now, so feature modules can rely on custom configurations in the column definition to be there at runtime.

I'm also tracking the migration/reimplementation of sorting in this GitHub issue: https://github.com/lsmith/yui3/issues/7
Custom sorting will be supported.

Luke Smith

YUI Contributor

Posted: 12/14/11
  • blocks changed to 2531583

Luke Smith

YUI Contributor

Posted: 01/26/12
  • completed changed from 0 to .75
  • remaining changed from 1 to .25

Luke Smith

YUI Contributor

Posted: 01/28/12
  • completed changed from 0.75 to 1
  • remaining changed from 0.25 to 0
  • status changed from accepted to checkedin

Luke Smith

YUI Contributor

Posted: 01/28/12

Note custom sort functions will only be passed the two Model instances to compare. I'm thinking I'll change this back to pass the direction as well so custom sorters can do things like always list nulls at the top regardless of direction.

But that'll be another ticket.

Jenny Donnelly

YUI Developer

Posted: 05/10/12
  • resolution changed to fixed

Jenny Donnelly

YUI Developer

Posted: 05/10/12

checkedin -> closed

Jenny Donnelly

YUI Developer

Posted: 05/10/12
  • status changed from checkedin to closed

checkedin -> closed