Pergunta

I want to remove Assign a Customer Group action from dropdown in customer grid but i cannot override it in custom module, can anyone let me know how to achieve it? i have tried by taking node and removed that action from my custom module customer_listing.xml but it still displays that action.

need to remove this action

Foi útil?

Solução

Solution given below works magento opensource 2.3.3 and above (tested)

It will work, set actionDisable node to true to disable the MassAction from the dropdown list of actions

<actionDisable>true</actionDisable>

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <listingToolbar name="listing_top">
        <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
            <action name="assign_to_group">
                <settings>
                     <actionDisable>true</actionDisable>
                </settings>
            </action>
        </massaction>
    </listingToolbar>
</listing>

Update

For versions below 2.3.3. use the one explained in the links below

https://magento.stackexchange.com/a/231723/695

https://webkul.com/blog/hide-mass-actions-based-on-some-conditions-in-magento-2/

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top