F
Filamentβ€’14mo ago
DanielvdSpoel

Checklist not sorted correctly

I have this code:
CheckboxList::make('days')
->label('Standaard beschikbaarheid')
->relationship('days', 'name', function (Builder $query) {
return $query->orderBy('day_of_week');
})
->getOptionLabelFromRecordUsing(fn (Model $record) => __('days.' . $record->name))
CheckboxList::make('days')
->label('Standaard beschikbaarheid')
->relationship('days', 'name', function (Builder $query) {
return $query->orderBy('day_of_week');
})
->getOptionLabelFromRecordUsing(fn (Model $record) => __('days.' . $record->name))
but it's not being sorted, does anyone know why?
6 Replies
DanielvdSpoel
DanielvdSpoelOPβ€’14mo ago
it's not being sorted on day of week, also not on id/alphabeticly bumb
LeandroFerreira
LeandroFerreiraβ€’14mo ago
not sure about v2 but on v3 it is working
DanielvdSpoel
DanielvdSpoelOPβ€’14mo ago
yeah but becouse of one plugin we can't update
toeknee
toekneeβ€’14mo ago
So there was a bug in V2 I believe seeing something about this, have a look through the PR's and see if there was a fix you can port back
DanielvdSpoel
DanielvdSpoelOPβ€’14mo ago
ahhh shit πŸ˜‚
Want results from more Discord servers?
Add your server