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
|
Posted: 09/21/11
|
|
Posted: 09/21/11
|
|
Posted: 12/14/11
|
|
Posted: 12/14/11
|
|
Posted: 01/26/12
|
|
Posted: 01/28/12
|
|
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. |
|
Posted: 05/10/12
|
|
Posted: 05/10/12
checkedin -> closed |
|
Posted: 05/10/12
checkedin -> closed |
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.