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?
code :-
<fieldset name="custom_tab">
<settings>
<label translate="true">Settings</label>
<imports>
<link name="visible">${ $.provider }:data.hide-export</link>
</imports>
</settings>
</fieldset>
-
Share your code.Chirag Patel– Chirag Patel2019年05月27日 04:25:39 +00:00Commented May 27, 2019 at 4:25
2 Answers 2
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 tabNewBie– NewBie2019年05月27日 06:19:26 +00:00Commented May 27, 2019 at 6:19
-
after this truncate 'ui_component' table and run commands upgrade,deploy,indexer and cacheHardik Makwana– Hardik Makwana2019年05月27日 06:21:10 +00:00Commented 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.NewBie– NewBie2019年05月27日 06:26:20 +00:00Commented May 27, 2019 at 6:26
-
check this link: magentodev.in/…Prashant Patel– Prashant Patel2019年05月27日 07:29:31 +00:00Commented May 27, 2019 at 7:29
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();
Explore related questions
See similar questions with these tags.