0

I tried additional classes but it working with the content of my custom tab still not working with my custom tab. So who can help me how to add a class for custom tab?

enter image description here

code :-

<fieldset name="custom_tab"> 
     <settings> 
           <label translate="true">Settings</label> 
           <imports> 
                <link name="visible">${ $.provider }:data.hide-export</link> 
           </imports> 
     </settings>
</fieldset> 
0

Please apply following code

<fieldset name="custom_tab"> 
 <settings> 
       <label translate="true">Settings</label> 
         <additionalClasses>
            <class name="custom_class_name">true</class>
         </additionalClasses>
       <imports> 
            <link name="visible">${ $.provider }:data.hide-export</link> 
       </imports> 
 </settings>

  • I tried this code but it not working with custom tab – NewBie May 27 at 6:19
  • after this truncate 'ui_component' table and run commands upgrade,deploy,indexer and cache – Hardik Makwana May 27 at 6:21
  • It just add class for content of custom tab but i want add class for tab to hide it. – NewBie May 27 at 6:26
  • check this link: magentodev.in/… – Prashant Patel May 27 at 7:29
0

I have checked all the way... but seems currently it not show me anyway to add htmlclass in tab.

I have checked

vendor/magento/module-ui/view/base/ui_component/etc/definition/ui_component.xsd

which only allow below attribute to filedset

         <xs:attributeGroup name="ui_element_attributes">
                <xs:attribute ref="name" use="optional" />
                <xs:attribute ref="template" use="optional"/>
                <xs:attribute ref="component" use="optional" />
                <xs:attribute ref="class" use="optional"/>
                <xs:attribute ref="provider" use="optional"/>
                <xs:attribute ref="sortOrder" use="optional"/>
                <xs:attribute ref="displayArea" use="optional"/>
                <xs:attribute ref="extends" use="optional"/>
            </xs:attributeGroup>

so you can make custom js and hide the tab like below:

             jQuery("#tab_general").parent('li').hide();

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.