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> 
Ronak Rathod
6,58020 silver badges46 bronze badges
asked May 27, 2019 at 4:04
1
  • Share your code. Commented May 27, 2019 at 4:25

2 Answers 2

1

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>
answered May 27, 2019 at 6:14
4
  • I tried this code but it not working with custom tab Commented May 27, 2019 at 6:19
  • after this truncate 'ui_component' table and run commands upgrade,deploy,indexer and cache Commented May 27, 2019 at 6:21
  • It just add class for content of custom tab but i want add class for tab to hide it. Commented May 27, 2019 at 6:26
  • check this link: magentodev.in/… Commented May 27, 2019 at 7:29
1

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();
answered May 27, 2019 at 11:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.