question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BTabs lazy - do not un-mount on deactivate (actual lazy)

See original GitHub issue

Is your feature request related to a problem? Please describe…

While using tabs together with lazy, a tab will be mounted once activated, and un-mounted once deactivted.

However I want a tab to be mounted once activated, and stay that way (only be unmounted once parent is also unmounted, as usual).

Describe the solution you’d like

add another property such as lazy-once

Describe alternatives you’ve considered

Creating my own wrapper around tab with my own implementation of lazy, passing all other attributes and events to vue-bootstrap’s tab component.

Additional context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
matanshukrycommented, Mar 22, 2020

It’s not that different from my component, only you’re using @click to detect once it’s seen (and also creating the title your self rather than using the property, although I’m not really sure why). While it’s shorter it still has the same “flaw” of my component - it’s in my project.

I’m aware I can “bypass” this feature request and do it on my one with a wrapper, but I believe it’s a useful feature.

Personally I’m not even sure why one would want the current lazy behavior - what is a use of a lazy that keeps deactivating/re-mounting? …

1reaction
SlyDavecommented, Jul 7, 2020

Totally in need of this feature right now! - thanks for the workaround even though they’re annoying more complex for my use case - which is where these tabs are dynamically being included in via a b-table’s v-slot:row_details where the table(s) itself is created by a v-for loop - thus the number of b-tables and b-tabs is unknown, so binding becomes a bit of a challenge…

Being able to lazy-load-once would be awesome.

For that matter, it’d be awesome if that could also be done for b-table v-slot:row-details too…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to "lazy load" tab navigator screens now ... - Stack Overflow
Thus, you should be able to pass lazy={true} in your TabNavigatorConfig object, and then tabs will not be rendered before they are active....
Read more >
Tab components - React-Bootstrap
A function that takes an eventKey and type and returns a unique id for child tab <NavItem> s and <TabPane> s. The function...
Read more >
Bottom Tabs Navigator | React Navigation
A simple tab bar on the bottom of the screen that lets you switch between different routes. Routes are lazily initialized -- their...
Read more >
Tabs | Components - BootstrapVue
The tabs component is built upon navs and cards internally, and provides full ... Individual <b-tab> components can be lazy loaded via the...
Read more >
React-Bootstrap Tabs Component - GeeksforGeeks
unmountOnExit : It is used to unmount the tabs. variant: It is used to define the navigation style. Tab Props: disabled: It is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found