#V4 Money Format TextInput?

2 messages · Page 1 of 1 (latest)

modern root
#

I've noticed in V4, the existing code only renders values without decmials. For example:

               TextInput::make('total_lump_sums')
                    ->label('Total Lump Sums')
                    ->columnSpan(2)
                    ->mask(RawJs::make('$money($input)'))
                    ->stripCharacters(',')
                    ->formatStateUsing(fn ($state) => number_format((float) $state, 2))
                    ->prefix('£')
                    ->numeric(),

did show as: 149859.65

now shows as: 149

We do have the MoneyCasts cast on this too as per v3 docs. Suggestions what's changed for this?

mortal craterBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution