yui/yui3 — pull request #1526 by apipkin (2014-01-03 17:42:52+00:00)
Title: [WIP] DT Expand

This is the first part of my pull request for a row expander. This outlines what I'm going towards. I would be happy with any thoughts related to this pull request or wishes for the row expander as it's being built.

```
new Y.DataTable({

columns: [ Y.DataTable.Expand.key, 'isbn', 'title', 'author'],

data: [
{ isbn: '', title: '', author: '', qty: '', price: '' }
],

expandable: true,

expandColumns: ['price', 'qty', {
key: 'total',
formatter: function (o) {
var data = o.data;

return Y.Intl.NumberFormat(data.price * data.qty, { style: 'currency' });
}
}],

expandTemplate: '

Price: {price}
Qty: {qty}

Total: {total}

'

});

When collapsing a row, the child row does not get removed, it is only hidden.

Listen for data changes to update all expanded child rows and remove all hidden child rows.

Child rows will take the width of the table starting with the cell to the right of expand column.

[template]
is used.
[template] is determined on the existance of expandTemplate,
if it does not exist

{{#cells}}	{{value}}{{/cells}}

is used.

expandColumns is used to create a new tabled row, (create headers for this table?)

expandTemplate is used to create a formated HTML node to customize the look of the expanded row.

if expandColumns and expandTemplate is used, the formatter for the cells is used inplace of the default cell value

```