BadgeColumn -> colors not displaying properly

Hello, I have a standalone table that I am having issues with when trying to set the badge color to be set by the value of it. The odd part is that I am using enum to transform the set of know values and that works as expected. At first I thought that had something to do with it, but even if I remove the enum it is not working. I should add that the color that shows on all the cells for the column is gray. function getTableColumns(): array has: BadgeColumn::make('status_id') ->label('Status') ->colors([ 'danger' => '1', 'warning' => '2', 'success' => '3', ]) ->enum([ '1' => 'Recorded', '2' => 'Rejected', '3' => 'Submitted', ]), tailwind.config.js has: theme: { extend: { colors: { danger: colors.rose, primary: colors.blue, success: colors.green, warning: colors.yellow, },...
3 Replies
rg.block
rg.blockOP2y ago
I also tried setting it using a callback, using the cell's $state but that did not work either
Dan Harrin
Dan Harrin2y ago
maybe danger' => 1 instead of 'danger' => '1'
rg.block
rg.blockOP2y ago
yeah, that was it, super rookie mistake for not checking that. Thanks.
Want results from more Discord servers?
Add your server