Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Investigate fixing the tab api #4836

Closed
6 tasks done
wesleycho opened this issue Nov 7, 2015 · 5 comments
Closed
6 tasks done

Investigate fixing the tab api #4836

wesleycho opened this issue Nov 7, 2015 · 5 comments

Comments

@wesleycho
Copy link
Contributor

We need to make a breaking change to fix how the tab API is handled. It is a much more awkward component to use than the accordion, which allows for more use cases.

In particular, we have bugs against the select callback api, and the active state should be kept at a higher level since we can only have one tab active at any given time.

API needs to

  • Expose active state separate from the tab object and into a single two-way bound value
  • Select in a more flexible manner
  • Allow passing in of event into select callback
  • Handle dynamically generated tabs gracefully with selection of first tab
  • Handle ng-if, ng-show, ng-hide gracefully
  • Allow animate support with showing/hiding new tab (investigate content transcluding re: Add support for tab fade effect #4339)
@chenyuzhcy
Copy link
Contributor

I have fix for one of the issue, should I just creat a pr and refer to the item or should I try to fix all of them and creat one pr for all?

@icfantv
Copy link
Contributor

icfantv commented Nov 10, 2015

Using one PR for each and referencing this issue is fine - we won't close the issue until all the checkboxes are addressed.

We use the checkboxes in the description allow us to track progress separately and we've done this for other issues - adding the uib- prefix was one such issue.

@daniel-jann
Copy link

I guess "Allow passing in of event into select callback" was meant to address #2715 (A way to intercept tab change), but #2715 also mentions being able to prevent tab selection (I believe that's not been addressed yet, has it ?)

@icfantv
Copy link
Contributor

icfantv commented Mar 31, 2016

@daniel-jann, #5720 was entered for this feature.

icfantv added a commit to icfantv/bootstrap that referenced this issue Mar 31, 2016
* add ability for user to prevent currently selected tab's deselction by
calling `$event.preventDefault()` in tab's `deselect` callback.

Fixes angular-ui#5720
Addresses angular-ui#2715, angular-ui#4836, and angular-ui#5716.
icfantv added a commit to icfantv/bootstrap that referenced this issue Mar 31, 2016
* add ability for user to prevent currently selected tab's deselection by
calling `$event.preventDefault()` in tab's `deselect` callback.

Fixes angular-ui#5720
Addresses angular-ui#2715, angular-ui#4836, and angular-ui#5716.
icfantv added a commit that referenced this issue Mar 31, 2016
* add ability for user to prevent currently selected tab's deselection by
calling `$event.preventDefault()` in tab's `deselect` callback.

Fixes #5720
Addresses #2715, #4836, and #5716.
Closes #5723
@wesleycho
Copy link
Contributor Author

Here is a demonstration of being able to animate using the current api.

Closing this as resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants