Skip to content

Magento 2 – Admin grid filter should be single select

Magento 2.4 – Admin UI component grid filter should be single select but multi select is coming.

enter image description here

XML Code

<column name="status" component="Magento_Ui/js/grid/columns/select">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">VendorCustomModuleModelSourceStatus</item>
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">select</item>
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Status</item>
                    <item name="sortOrder" xsi:type="number">80</item>
                </item>
            </argument>
</column>

Option return

 public function toOptionArray()
    {
        return [
            ['value' => '0', 'label' => __('Disabled')],
            ['value' => '1', 'label' => __('Enabled')],
        ];
    }

In the above photo need to remove checkbox option. How we can achive this one?