Filament Checkboxlist returns raw HTML
Im trying to make a dynamic checkboxlist. For each checkbox, i want to show an Font-Awesome icon.
The issue is, that it just renders as a regular string.
Any idea how to solve that?
Tab::make('Faciliteter')
->schema([
Grid::make(1)
->schema([
CheckboxList::make('facilities')
->relationship('facilities', 'facility_name')
->getOptionLabelFromRecordUsing(function ($record) {
return new HtmlString('<i class="fa fa-' . $record->facility_fa_icon . '"></i> ' . $record->facility_name);
})
->columns(5),
]),
]),
The issue is, that it just renders as a regular string.
Any idea how to solve that?
Tab::make('Faciliteter')
->schema([
Grid::make(1)
->schema([
CheckboxList::make('facilities')
->relationship('facilities', 'facility_name')
->getOptionLabelFromRecordUsing(function ($record) {
return new HtmlString('<i class="fa fa-' . $record->facility_fa_icon . '"></i> ' . $record->facility_name);
})
->columns(5),
]),
]),