F
Filamentβ€’3w ago
Roncarino

Pagination number looks like a float

Hi guys, I have a weird one. I am now on Filament v4. I can't say if it was like this even on Filament v3, to be honest, but my pagination looks like with float values. πŸ˜… As you can see in the image, for example, the last page is supposed to be "3630" or "3,630" (if we indicate thousand with a comma), but for sure not "3,63". I feel like it is an odd one because I don't think there is a real way to specify pagination to have "int" values. πŸ€” Thanks in advance for any help. Cheers. Loris
No description
Solution:
I have found the problem. In Filament v3 I added "Schema::configureUsing(fn(Infolist $infolist) => $infolist->defaultNumberLocale('it'))" in boot but it wasn't working after Filament v4 update. In Filament v4 then I have changed that to "Number::useLocale('it_IT')" and that is effecting pagination numbers as well....
Jump to solution
4 Replies
Roncarino
RoncarinoOPβ€’3w ago
It might be an assets filament problem maybe πŸ€”
toeknee
toekneeβ€’3w ago
It looks like 3,63 is actually 3,630 but the 0 has been cut by the display. Cna you check that the text exists?
Solution
Roncarino
Roncarinoβ€’3w ago
I have found the problem. In Filament v3 I added "Schema::configureUsing(fn(Infolist $infolist) => $infolist->defaultNumberLocale('it'))" in boot but it wasn't working after Filament v4 update. In Filament v4 then I have changed that to "Number::useLocale('it_IT')" and that is effecting pagination numbers as well.
Roncarino
RoncarinoOPβ€’3w ago
I used that to globally change locale numbers and set that to "italy" but, to be honest, I don't remember if I have done that to actually "fix" something or simply to be sure the locale was applied to the app. I have temporarily commented out that and it is now fine. We'll see if I needed it in a second moment. Cheers

Did you find this page helpful?