Foros de discusión
Text is unselectable in aui-datatable
Chris Mount, modificado hace 10 años.
Text is unselectable in aui-datatable
New Member Mensajes: 11 Fecha de incorporación: 6/04/12 Mensajes recientes
I have a simple aui-datatable and the text inside a row is not selectable when I use Y.Datatable instead of Y.DataTable.Base. The Examples on alloyui.com use both. Is there property or attribute that I need to set? I see in the CSS that when I click on a TD a .unselectable is being set.
Ex)
Ex)
<meta charset="utf-8">
<title>AUI DataTable </title>
<div id="x"></div>
<script src="http://cdn.alloyui.com/2.0.0/aui/aui-min.js"></script>
<link href="http://cdn.alloyui.com/2.0.0/aui-css/css/bootstrap.min.css" rel="stylesheet">
<script>
YUI().use(
'aui-datatable',
function (Y) {
var data = [
{ name: 'Frank Zappa', age: 71 },
{ name: 'Frank Lloyd Wright', age: 144 },
{ name: 'Albert Einstein', age: 132 },
{ name: 'Buckaroo Bonzai', age: 64 },
{ name: 'Egg Shen', age: 84 },
{ name: 'Colonel Mustard', age: 68 },
{ name: 'Peter Sellers', age: 86 }
];
var table = new Y.DataTable({ //var table = new Y.DataTable.Base({
columns: [
{ key: "name" },
{ key: "age"}
],
data: data,
});
table.render('#x');
});
</script>
Jana Lampe, modificado hace 8 años.
RE: Text is unselectable in aui-datatable
New Member Mensajes: 3 Fecha de incorporación: 25/11/15 Mensajes recientes
I had the same issue. After spending some hours, I found out that it was sufficient to remove all subscribed "mousedown"-events, i.e.
datatable.get('contentBox').purge(true,'mousedown');
datatable.get('contentBox').purge(true,'mousedown');
Byrån Zaugg, modificado hace 8 años.
RE: Text is unselectable in aui-datatable
Expert Mensajes: 252 Fecha de incorporación: 6/04/12 Mensajes recientes
There doesn't appear to be a property to disable unselectable. Not sure why thought.
I'm guessing that selections may have interfered with DataTable's other row/cell features....maybe? That's just a guess though.
I'm guessing that selections may have interfered with DataTable's other row/cell features....maybe? That's just a guess though.