F
Filamentβ€’3mo ago
KEANUH

I have a table where the ID field is represented like this: 1,030 and I want to remove the separator

What I want is for the number to appear like this: 1.030 instead of being like this: 1,030 I have tried with mask but it only works in V2 in V3 they changed it and it can only be done with TextInput and this is a TextColumn So I don't know how to change it, if I remove the numeric() what it does is that it represents the numbers like this: 1030 without , or .
No description
Solution:
The ->numeric() accepts a few parameters. Perhaps the thousandsSeparator is usable here?
No description
Jump to solution
4 Replies
toeknee
toekneeβ€’3mo ago
->formatStateUsing(fn($state) => number_format((int) $state, 0))
Solution
emiel
emielβ€’3mo ago
The ->numeric() accepts a few parameters. Perhaps the thousandsSeparator is usable here?
No description
emiel
emielβ€’3mo ago
So to be clear:
Tables\Columns\TextColumn::make('id')
->numeric(thousandsSeparator: ''), // Empty string
Tables\Columns\TextColumn::make('id')
->numeric(thousandsSeparator: ''), // Empty string
KEANUH
KEANUHβ€’3mo ago
thank you so much !! πŸ‘πŸΏ