0

I have created buttons for a page in m2 admin. Please see below screenshot.

enter image description here

I've used following xml code at /view/adminhtml/ui_component/buttons.xml:

    <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
 <item name="buttons" xsi:type="array">
            <item name="addAllProductsForSync" xsi:type="array">
                <item name="name" xsi:type="string">addAllProductsForSync</item>
                <item name="label" xsi:type="string" translate="true">Add all Products For Sync</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="string">*/*/addAllProductsForSync</item>
            </item>
            <item name="EnqueueAllInProgress" xsi:type="array">
                <item name="name" xsi:type="string">EnqueueAllInProgress</item>
                <item name="label" xsi:type="string" translate="true">Enqueue All In Progress</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="string">*/*/backToQueue</item>
            </item>
            <item name="clearQueue" xsi:type="array">
                <item name="name" xsi:type="string">clear</item>
                <item name="label" xsi:type="string" translate="true">Clear Queue</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="string">*/*/clear</item>
            </item>
            <item name="clearEntities" xsi:type="array">
                <item name="name" xsi:type="string">clear</item>
                <item name="label" xsi:type="string" translate="true">Clear Entities Sync</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="string">*/*/clearentities</item>
            </item>
            <item name="truncateQueue" xsi:type="array">
                <item name="name" xsi:type="string">truncate</item>
                <item name="label" xsi:type="string" translate="true">Truncate Queue</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="string">*/*/truncate</item>
            </item>
        </item>
    </argument>
</listing>

As you see, buttons are taking much space. So, can I club them into a drop down or something similar without break the existing functionality?

Your help would be appreciated. Thank you!

4
  • You can follow this link Hope it will help you :) Commented Dec 14, 2023 at 9:30
  • @AzizKapasi It's worked. Thanks again! Commented Dec 26, 2023 at 6:45
  • Welcome, can you please upvote the comment, it'll help others with same issue Commented Dec 26, 2023 at 6:53
  • Sure @AzizKapasi, I'll do it. Could you help me in my latest question? Link: magento.stackexchange.com/questions/371403/… Commented Dec 26, 2023 at 7:00

0

Your Answer

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

Browse other questions tagged or ask your own question.