Skip to content

Commit

Permalink
partially revert #980
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcobain committed Nov 26, 2018
1 parent 8134472 commit 7abaeaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addon/components/paper-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export default Component.extend(ParentMixin, ColorMixin, {

selected: 0, // select first tab by default

_selectedTab: computed('childComponents.@each.value', 'selected', function() {
return this.get('childComponents').findBy('value', this.get('selected'));
_selectedTab: computed('childComponents.@each.isSelected', function() {
return this.get('childComponents').findBy('isSelected');
}),

_selectedTabDidChange: observer('_selectedTab', function() {
Expand Down
3 changes: 2 additions & 1 deletion tests/dummy/app/templates/demo/tabs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
</em>
</p>
<p>
<b>Hint:</b>for Ember versions less than 2.15, use the <code>ember-router-service-polyfill</code> addon to easily retrieve
<b>Hint:</b> for Ember versions less than 2.15, use the <code>ember-router-service-polyfill</code> addon to easily retrieve
the current route name and use it as the selected value to <code>paper-tabs</code>.
</p>
{{/paper-card-content}}
Expand All @@ -248,6 +248,7 @@
(p-section
"`tabs.tab` API"
(p-row "value" "string" "Value associated with the tab. To activate the tab, `selected` needs to have this value. Each tab gets a value automatically set to its index, so you don't need to use this property unless you need specific values for some special case.")
(p-row "isSelected" "boolean" "Optionally you can set a specific tab as selected directly without relying on the global tabs value.")
(p-row "disabled" "boolean" "Pass `true` to disable the tab button.")
(p-row "href" "string" "You can pass an href to the tab button to render a link. Hint: use `ember-href-to` to generate route urls.")
(p-row "onClick" "action" "An action triggered when the tab button is clicked.")
Expand Down

0 comments on commit 7abaeaa

Please sign in to comment.