Hi all
The Indicator Field seems not work for a boolean field, as I guess it's not it's intended behaviour. However, it would be great if this would work with boolean fields, too, as I think boolean fields in Nova lack of options to customize.
I can make it work with boolean with a computed field:
Indicator::make('Some Bool', function () {
return (int) $this->someBool;
})->labels([
0 => 'inactive'
1 => 'active'
])
but this takes away "sortable". Is there a better place to cast the boolean?
Hi all
The Indicator Field seems not work for a boolean field, as I guess it's not it's intended behaviour. However, it would be great if this would work with boolean fields, too, as I think boolean fields in Nova lack of options to customize.
I can make it work with boolean with a computed field:
but this takes away "sortable". Is there a better place to cast the boolean?