Add a break line in the column Title #1157
Unanswered
BenOussama180
asked this question in
Q&A
Replies: 1 comment
-
Yep, use the setThAttributes() Method in the configure() section, and pass "default => false" into the array. e.g. $this->setThAttributes(function(Column $column) {
if ($column->isField('organic_search_traffic')) {
return [
'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400',
'default' => false
];
}
return [];
}); The bits in the "class" is all of the default items, but without "whitespace-nowrap", so it'll allow it to wrap. Make sure to reference by FIELD not Column name here, and keep in mind that the default classes may change You could also just add "whitespace-break-spaces", but your mileage may vary with some browsers, as some will take override later instances. $this->setThAttributes(function(Column $column) {
if ($column->isField('organic_search_traffic')) {
return [
'class' => 'whitespace-break-spaces',
];
}
return [];
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
so i have a long column title

i want to insert break lines to make space in the table ,
i tried this but not working sadly :
@lrljoe any idea on a workaround for this , thanks in advanced!
Beta Was this translation helpful? Give feedback.
All reactions