0

I want to hide some columns from customer listing grid. I try to use false in customer_listing.xml, but it doesn't work. And I noticed that some columns (for example "confirmation", "created_in", "billing_full") in magento's ui component xml file have options visible = false but they don't hide in grid. How can I hide this columns? I don't want to disable them, just hide them. Thanks in advance. P.S. I want to change visability from code for all new admin users.

0

2 Answers 2

0

I found the solution. I created before plugin for class vendor/magento/module-ui/Model/BookmarkManagement.php and method loadByNamespace. I created new bookmarks for current customer with my configuration.

0

Try the bellow code with create custom app/code/Vendor/Module/view/adminhtml/ui_component/customer_listing.xml file.

It works for me.

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
        <column name="billing_telephone">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="componentDisabled" xsi:type="boolean">true</item>
                </item>
            </argument>
        </column>
        <column name="billing_postcode">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="componentDisabled" xsi:type="boolean">true</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

I hope this will help you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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