ariaieboy / filament-currency

Enhanced Currency Related stuff for Filament
MIT License
42 stars 8 forks source link

[Bug]: Masking on '$set' value seems to be broken still #31

Closed quinleys closed 4 months ago

quinleys commented 4 months ago

What happened?

Thanks for looking into it this quickly! But same issue applies, nothing has changed for me. Maybe I can contact you directly, might be easier.

As you can see, in the open section at the lower part of the screenshot. I got two fields 'Commission Makelaar' & 'Commission Financo' both are using the same logic to be set using the first 4 fields (upper part of the screenshot). Commission Makelaar has the mask enable, while the right doesn't.

CleanShot 2024-05-30 at 18 04 33@2x

How to reproduce the bug

// Field on updated currency field (full_commission_amount) on afterStateUpdate
   \Filament\Forms\Components\TextInput::make('commission_percentage')
      ->afterStateUpdated(fn(Forms\Get $get, Forms\Set $set) => self::updateProjectCalculations($set, $get))
// here the $set value can't be seen
\Filament\Forms\Components\TextInput::make('full_commission_amount')
 ->numeric()
 ->currencyMask()

Package Version

1.7.4

PHP Version

8.2

Laravel Version

11.4

Which operating systems does with happen with?

No response

Notes

No response

ariaieboy commented 4 months ago

if you create a public repo that contains the minimum code to reproduce this bug I can debug it faster you can use my https://github.com/ariaieboy/filament-dev-env repo to create a reproducible environment

quinleys commented 4 months ago

Alright, give me 5 minutes. I will give you a repo. Thanks!

quinleys commented 4 months ago

Here you go, https://github.com/quinleys/filament-currency-bug

Check the ProjectResource file at line 37

ariaieboy commented 4 months ago

https://github.com/ariaieboy/filament-currency/releases/tag/1.7.5 test 1.7.5 it should be fixed