I have a tabs with navigaion setup using Vue that is working just fine thanks to a previous question HERE. The code for the tabs navigation looks like this:
<ul>
<c:forEach items="${tabnav.tabs}" var="tab" varStatus="loop">
<c:if test="${loop.count le tabnav.totalTabs}">
<li v-bind:class="{active : tabSelected = ${loop.count}}" v-on:click="tabSelected =
${loop.count}">${tab.heading}</li>
</c:if>
</c:forEach>
</ul>
My goal is to have 2 navigation for the tabs content area. The dynamically created <li> for desktop and a <select> dropdown for mobile.
I seem to be having issues with the select and it will not change the tabs and the 2 navigations are not in sync with each other. Meaning if I were to change the visible tab using the desktop li nav, the mobile select option should keep the correct active tab content area/option vice verse.
My Code for the select is this:
<select>
<c:forEach items="${tabnav.tabs}" var="tab" varStatus="loop">
<c:if test="${loop.count le tabnav.totalTabs}">
<option v-on:change="tabSelected = ${loop.count}">${tab.heading}</option>
</c:if>
</c:forEach>
</select>
Do I need to create a method in Vue for this?