TC
Twill CMS2mo ago
Sami

renderHtml doesn't work in getBrowserTableColumns()

Hello, I'd like to render a small colored div inside browser column but renderHtml(true) doesn't seem to work
public function getBrowserTableColumns() : TableColumns
{
$table = parent::getBrowserTableColumns();

$table->add(
Text::make()->field('titled')->customRender(fn() => '<div style="background-color:red;">I wish this was rendered HTML</div>')->renderHtml(true)
);

return $table;
}
public function getBrowserTableColumns() : TableColumns
{
$table = parent::getBrowserTableColumns();

$table->add(
Text::make()->field('titled')->customRender(fn() => '<div style="background-color:red;">I wish this was rendered HTML</div>')->renderHtml(true)
);

return $table;
}
It works in getIndexTableColumns() tho any ideas? Twill 3.4.0
2 Replies
ifox
ifox2mo ago
HI @Sami, it looks like browser columns do not support it at the moment it should definitely be possible to implement though I'll add it to our roadmap
Sami
SamiOP5w ago
Thanks ifox
Want results from more Discord servers?
Add your server