filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.59k stars 2.75k forks source link

TextInputColumn mask disappears after state change #13322

Open pmartelletti opened 2 months ago

pmartelletti commented 2 months ago

Package

filament/filament

Package Version

v3.2.92

Laravel Version

v11.11.0

Livewire Version

v3.5.1

PHP Version

PHP 8.3.7

Problem description

When using the TextInputColumn in combination with dynamic masking (in particular, $money mask, but it happens with any mask as well), the masking is removed after a record is updated (not just from the update record but for all of them). Masking only appear on page full refresh.

Expected behavior

I'd expect the masking to continue to appear after the record has been updated.

Steps to reproduce

I'm attaching a very minimal repo where this error is reproduced. If you go to the Accounts resource, you'll be able to reproduce this by changing the "Balance" column of any of the accounts in the index table.

Please note the following:

Reproduction repository (issue will be closed if this is not valid)

https://github.com/pmartelletti/text-column-input-bug

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

pmartelletti commented 2 months ago

BTW, probably best to use MySQL to reproduce this, as SQLite does not have a decimal type. I've found that using SQLite, the updateStateUsing is not needed and, in that case, the mask works as expected.