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
Publish the config/excel.php from the underlying Laravel Excel package and change strict_null_comparison to true
Overload the \Maatwebsite\LaravelNovaExcel\Actions\DownloadExcel class with a new class that implements the WithStrictNullComparison concern
Expected behavior:
With strict null comparison enabled, zero values in the database should export as zeros.
Actual behavior:
Zero values in the database export as null (empty cells).
Additional Information
This isn't an issue with the underlying Laravel Excel package - it works there.
I initially thought this was a bug but actually looking at the code I think it is just not implemented in this package so I have changed this to a proposal. I think it's possible to overcome this by creating a custom action but this is quite cumbersome.
Would be nice to see this implemented in the Nova package because I think it's quite important especially when dealing with Boolean fields in Laravel.
The text was updated successfully, but these errors were encountered:
Prerequisites
Versions
Description
Can't enable strict null comparison
Steps to Reproduce
Two ways I have tried:
config/excel.php
from the underlying Laravel Excel package and changestrict_null_comparison
totrue
\Maatwebsite\LaravelNovaExcel\Actions\DownloadExcel
class with a new class that implements theWithStrictNullComparison
concernExpected behavior:
With strict null comparison enabled, zero values in the database should export as zeros.
Actual behavior:
Zero values in the database export as null (empty cells).
Additional Information
This isn't an issue with the underlying Laravel Excel package - it works there.
I initially thought this was a bug but actually looking at the code I think it is just not implemented in this package so I have changed this to a proposal. I think it's possible to overcome this by creating a custom action but this is quite cumbersome.
Would be nice to see this implemented in the Nova package because I think it's quite important especially when dealing with Boolean fields in Laravel.
The text was updated successfully, but these errors were encountered: