Ticket #2531900 (closed enhancement)

Reporter


Luke Smith
Opened: 03/15/12
Last modified: 08/1/12
Status: closed
Type: enhancement
Resolution: fixed

Owner


Luke Smith
Target Release: 3.6.0
Priority: P3 (normal)
Summary: Default columns from the data ModelList's model if set
Description:

_initColumns currently only looks for recordType being set. recordType defaults from the data ModelList if its model is set, but *after* _initColumns. If columns could default from the data
ModelList's model's ATTRS, then you could create a complete table from


var table = new Y.DataTable({ data: someModelList }).render();

// bonus if the ML class has a sync layer
table.data.load();

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

Change History

Luke Smith

YUI Contributor

Posted: 04/5/12
  • sprint changed to sprint 1

Luke Smith

YUI Contributor

Posted: 05/8/12
  • completed changed from 0 to 1
  • estimated changed from 0.1 to 1.5
  • remaining changed from 0.1 to .5
  • sprint changed from sprint 1 to sprint 2

Luke Smith

YUI Contributor

Posted: 05/8/12
  • priority changed from P4 (low) to P3 (normal)
  • severity changed from S5 (trivial) to S3 (normal)

There is an opportunity here to clean up the instantiation and attribute defaulting logic.

Luke Smith

YUI Contributor

Posted: 05/10/12
  • completed changed from 1 to 2
  • remaining changed from 0.5 to 0
  • status changed from accepted to checkedin

Luke Smith

YUI Contributor

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

Restructure instantiation logic. Fixes #2531900

recordType no longer defaults, but is a pass thru attribute to assign
the ModelList's model property. Columns only default from array data
at instantiation. Removed data attribute getter and a few other
methods. Added valueFn for data.

This should reduce the code size as well, but there are other
minification opportunities to do to achieve maximum shrinkage.
View Commit: ed9c344b09d31bcd71478fd2842e674c9d28e94f

Jenny Donnelly

YUI Developer

Posted: 08/1/12
  • status changed from checkedin to closed

Shipped in 3.6.0. Marking closed/fixed.