-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Deleting a tab in v-tabs causes errors #5515
Comments
I am experiencing a similar issue (Bug 1). I have an array of details rendering to the tabs; and when the array of details changes, the slider doesn't move. (e.g. array of 5 items w/ 5th item selected, then array of 2 items - nothing selected and slider at phantom 5th item). (Yes, I see you've added the milestone for 1.3.x - just sharing) |
I have a fix for this going into #6606 with 1 caveat for Case A. The Alternatively you could obviously manually change the value to the new index but I'd still recommend the above process. |
@johnleider Thanks! I can very well understand why the values would be required, and would just do it this way. |
Fixed in f22d754 |
@johnleider Is this fix going to be included into 1.x or 2.x only? |
2.0 |
@johnleider Am I right in assuming that you can only declared values in |
I was not right In v-tabs you can use a declared value by using the h-ref property, like so
The value of the bound model now becomes |
Versions and Environment
Vuetify: 1.3.5
Vue: 2.5.17
Browsers: Chrome 70.0.3538.77
OS: Windows 10
Steps to reproduce
Deleting tab(s) will cause different errors
Case A shows what happens out of the box, while Case B is my attempt to change the active tab before it get's removed, which helps a bit, but there are still errors left.
Case A) Without manually changing "active"
("Preset active" checkbox unchecked)
Bug 1:
Bug 2:
Case B) Manually changing "active" before removing a tab
("Preset active" checkbox checked)
Bug3:
Expected Behavior
When removing tab(s), "active" should be recalculated and set automatically (see Chrome browser tabs as an example which tab should be the next active one)
Actual Behavior
After tab(s) are being removed, "active" is wrong, the slider will be at the wrong place, and tab changes will no longer work or have unexpected behavior (select wrong one etc)
Reproduction Link
https://codepen.io/anon/pen/yQBEmz?editors=1010
The text was updated successfully, but these errors were encountered: