Skip to content

switcherConfig not working with tab layout but works with collapsible

I am trying to add a switcherConfig on one of my ui component field. Its a simple show/hide rule based on value of one field.

<settings>
    <switcherConfig>
        <rules>
            <rule name="0">
                <value>0</value>
                <actions>
                    <action name="0">
                        <target>my_form.my_form.fieldset.target_field</target>
                        <callback>hide</callback>
                    </action>
                </actions>
            </rule>
            <rule name="1">
                <value>1</value>
                <actions>
                    <action name="0">
                        <target>my_form.my_form.fieldset.target_field</target>
                        <callback>show</callback>
                    </action>
                </actions>
            </rule>
        </rules>
        <enabled>true</enabled>
    </switcherConfig>
    <dataType>number</dataType>
    <label translate="true">Parent Field</label>
    <dataScope>parent_field</dataScope>
</settings>

This code works if I use collapsible layout but stops working when I change it to tabs layout. Did anyone face similar issue? Any suggestion on how to solve it?