magento2.3 – Filter after ‘null’ column values in the shipment grid issue on Magento 2.3.4

I’ve added a new column to the shipments grid: email_sent, by creating this file:


and this code:

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_shipment_columns">
        <column name="email_sent" class="VendorNameModuleNameUiComponentListingColumnEmailSent">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">VendorNameModuleNameModelConfigSourceEmailSent</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="filter" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Email Sent</item>

In the VendorNameModuleNameModelConfigSourceEmailSent I have this code:

class EmailSent implements ArrayInterface

    public function toOptionArray()
        return (
            ('value' =>  1, 'label' => __('Sent')),
            ('value' =>  0, 'label' => __('Not Sent'))

Filtering after Sent values is working, but filtering after Not sent are not. The sent_email contains NULL or 1 values. It is default Magento.
I tried different scenarious, like:

('value' =>  '', 'label' => __('Not Sent'))


('value' =>  null, 'label' => __('Not Sent'))

But it s not working.
enter image description here

Other info:

In my di.xml from app/code/VendorName/ModuleName/etc/adminhtml/di.xml I have this:

<?xml version="1.0"?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- Adds additional data to the shipment grid collection -->
    <type name="MagentoFrameworkViewElementUiComponentDataProviderCollectionFactory">
        <plugin name="vendorName_shipment_grid_collection" type="VendorNameModuleNamePluginAddDataToShipmentsGrid" sortOrder="10" disabled="false"/>

and in the AddDataToShipmentsGrid class I have this to get the values of email_sent from the sales_shipment table:

namespace VendorNameModuleNamePlugin;

use MagentoFrameworkViewElementUiComponentDataProviderCollectionFactory;
use MagentoSalesModelResourceModelOrderGridCollection;
use PsrLogLoggerInterface;
use Exception;

class AddDataToShipmentsGrid
     * @var LoggerInterface
    private $logger;

     * AddDataToOrdersGrid constructor.
     * @param LoggerInterface $customLogger
     * @param array $data
    public function __construct(
        LoggerInterface $customLogger,
        array $data = ()
    ) {
        $this->logger   = $customLogger;

     * @param CollectionFactory $subject
     * @param Collection $collection
     * @param $requestName
     * @return mixed
    public function afterGetReport($subject, $collection, $requestName)
        if ($requestName !== 'sales_order_shipment_grid_data_source') {
            return $collection;
        if ($collection->getMainTable() !== $collection->getResource()->getTable('sales_shipment_grid')) {
            return $collection;
        try {
            $shipmentTable = $collection->getResource()->getTable('sales_shipment');
                ('s' => $shipmentTable),
                's.increment_id = main_table.increment_id',

        } catch (Exception $error) {
            // Do nothing in that case

        return $collection;