Created
September 20, 2011 23:39
-
-
Save eduardolundgren/1230743 to your computer and use it in GitHub Desktop.
YUI 3.4.0 DataTable header width issues when scroll and sort are plugged.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI().use('datatable', function(Y) { | |
var cols = ["name","address","city", "state", "amount", "active", "colors", { key: "fruit", sortable: true }, { key: "last_login", sortable: true } ]; | |
var data = [ | |
{name:"John A. Smith", address:"1236 Some Street", city:"San Francisco", state:"CA", amount:5, active:"yes", colors:["red"], fruit:["banana","cherry"], last_login:"4/19/2007"}, | |
{name:"Joan B. Jones", address:"3271 Another Ave", city:"New York", state:"NY", amount:3, active:"no", colors:["red","blue"], fruit:["apple"], last_login:"2/15/2006"}, | |
{name:"Bob C. Uncle", address:"9996 Random Road", city:"Los Angeles", state:"CA", amount:0, active:"maybe", colors:["green"], fruit:["cherry"], last_login:"1/23/2004"} | |
]; | |
var dt = new Y.DataTable.Base({ | |
columnset: cols, | |
recordset: data, | |
plugins: [ | |
{ fn: Y.Plugin.DataTableScroll, cfg: { height: 300, width: 1000 } }, | |
{ fn: Y.Plugin.DataTableSort } | |
], | |
render: true | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment