You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Laravel Version: 10.37.3
Nova Version: 4.32.9
PHP Version: 8.2
Database Driver & Version: MYSQL
Operating System and Version: UNIX
Browser type and version: chrome 119.0.6045.124
Description:
I am using the displayUsing to show a computed number. So it's a basic Number field.
The issue is that when the value is 0 the it's returning the original value instead of the Number. My guess is that since the returned value is 0 the callback is treated the same as null and get the original value. Maybe we should do a strict check here to return original value only if returned value is a real NULL
Detailed steps to reproduce the issue on a fresh Nova installation:
Create a Number field with a value different than 0.
Then return 0 in the displayUsing() method. The result will not be zero but the original value
The text was updated successfully, but these errors were encountered:
Laravel Version: 10.37.3
Nova Version: 4.32.9
PHP Version: 8.2
Database Driver & Version: MYSQL
Operating System and Version: UNIX
Browser type and version: chrome 119.0.6045.124
Description:
I am using the
displayUsing
to show a computed number. So it's a basicNumber
field.The issue is that when the value is 0 the it's returning the original value instead of the Number. My guess is that since the returned value is 0 the callback is treated the same as null and get the original value. Maybe we should do a strict check here to return original value only if returned value is a real NULL
Detailed steps to reproduce the issue on a fresh Nova installation:
Create a
Number
field with a value different than 0.Then return 0 in the
displayUsing()
method. The result will not be zero but the original valueThe text was updated successfully, but these errors were encountered: