Im using AlloyUI 3.0. I used the code above:
YUI().use(
'aui-datatable',
function(Y) {
var columns = [
{label: 'ID', key: 'id'},
{label: 'Project Name', key: 'name'},
{label: 'Created At', key: 'created_at'}
],
data = [];
var myDataTable = new Y.DataTable({
plugins: [
{
cfg: {
selectRow: true
},
fn: Y.Plugin.DataTableSelection
},
{
cfg: {
highlightRange: false,
type: 'rows'
},
fn: Y.Plugin.DataTableHighlight
}
],
columns: columns,
data: data
})
.render("#myDataTable");
}
);
How to get the selected row data?
It's possible to define the selection event, click, double click, etc?