I am looking for a way to display and hide a section on my page when a specific tab is active, and close it when the tab is inactive. I have tried using the forceOpenSettings and forceCloseSettings methods for opening and closing the div. Is there an event that is triggered when a particular tab becomes active? I couldn't find one in the Bootstrap-Vue documentation, but I found something similar here -
I attempted to use the activate and deactivate events as explained in this section, but it didn't work:
<b-tab title="User Table" @activate="forceOpenSettings" @deactivate="forceCloseSettings"></b-tab>
Working Scenario
The same functionality works well here. I aim to open and close the same div, this time based on b-collapse. In the Bootstrap-Vue docs for b-collapse, I found @hide and @show event emitters - . Using these events worked perfectly. I just need a similar event emitter for tabs being active or inactive.
<b-collapse role="tabpanel" @show="forceOpenSettings" @hide="forceCloseSettings"></b-collpase>
NB - The section being shown and hidden is not a child of b-tabs or b-collapse. I simply want to manipulate the visibility of that div based on the tab status. The collapse feature is working correctly, but the tab activation is not.
If there are no built-in event emitters available, I may need to write a custom method to achieve this. However, it would be helpful if Vue.js provided event emitters for this purpose.