Expand row selection on click -- display non-truncated information in HTML
Expand row selection on click -- display non-truncated information in HTML
So I have a DataTable, with one column labeled "Description", that sometimes has very long text, like very long.
Also, just an FYI, I'm converting a DataFrame (pandas) to HTML then converting that to a DataTable.
One of the DataFrame options you can set is maxcolwidth, which will expand the column to fit the text. But sometimes the description column is just too long it makes the entirety of the table look bad. Would there be a way for me to have it so when it clicks on that particular data row, it expands?
For instance,
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem
would show up as
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been...
with only some of the text showing up. Then, when I set the maxcolwidth to -1 to expand to fit the text it would fit the text. But it's just too big. So what I want is somehow to click on this above text and expand it like you would in Excel to view the rest of the text.
Replies
Hi @ttataryn ,
My last answer on this thread here might help. This example from it does what you're after, I think.
Cheers,
Colin