pelmered / filament-money-field

Money field powered by Money PHP
MIT License
40 stars 19 forks source link

I can't make it return null #18

Closed DevDanielAlvarez closed 3 months ago

DevDanielAlvarez commented 3 months ago

image Hello, when I leave the Money input empty instead of returning a null (?) it returns an empty string (' '), and I need it to return null and not an empty string.

pelmered commented 3 months ago

Yes, it should probably return null in that case. I will look into this.

pelmered commented 3 months ago

Sorry, for not fixing this yet. I have been really busy the last few weeks. I should be able to fix this next week.

pelmered commented 3 months ago

@DevDanielAlvarez Sorry for the delay and thank you for the patience. This should now be fixed in 1.2.1.

demianottema commented 3 months ago

Looks like you have fixed the formatting, but this error happens durring the save (resulting in a broken query) I will supply a simple fix in a PR.

The code works for sure, but i dont know if it is in line with you codestyle. So feel free to change it!

Edit: @pelmered, the PR is submitted. Super simple but does the job! #23

pelmered commented 3 months ago

Looks like you have fixed the formatting, but this error happens durring the save (resulting in a broken query) I will supply a simple fix in a PR.

The code works for sure, but i dont know if it is in line with you codestyle. So feel free to change it!

Edit: @pelmered, the PR is submitted. Super simple but does the job! #23

Ah, shit. Sorry about that. My bad. Thanks for the PR. I added a comment there.

pelmered commented 3 months ago

Now in version 1.2.2 this should finally be fixed.