I want to remove export component from order toolbar page in Magento 2 admin.

I have already created an custom export component in my module but I want to remove default one.

See screenshot.enter image description here

Here is my code in "sales_order_grid.xml" in following folder


    <?xml version="1.0" encoding="UTF-8"?>
    <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <container name="listing_top">
            <exportButton class="Magento\Ui\Component\ExportButton">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="options" xsi:type="array">
                            <item name="cvs" xsi:type="array">
                                <item name="value" xsi:type="string">csv</item>
                                <item name="label" xsi:type="string" translate="true">CSV</item>
                                <item name="url" xsi:type="string">mui/export/gridToCsv</item>
                            <item name="xml" xsi:type="array">
                                <item name="value" xsi:type="string">xml</item>
                                <item name="label" xsi:type="string" translate="true">Excel XML</item>
                                <item name="url" xsi:type="string">mui/export/gridToXml</item>
                            <item name="mom" xsi:type="array">
                                <item name="value" xsi:type="string">mom</item>
                                <item name="label" xsi:type="string" translate="true">MOM</item>
                                <item name="url" xsi:type="string">mom/export/gridToMom</item>

My question is how to remove default one or override that in my module?


Change this

 <exportButton class="Magento\Ui\Component\ExportButton">


<exportButton name="export_button" class="Magento\Ui\Component\ExportButton">

The value of argument "name" should be the same as the mentioned in sales_order_grid uiCompoment of exportButton tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.