googlearchive / paper-tabs

A tabs à la Material Design
22 stars 21 forks source link

Setting selectedIndex outside item range renders bar outside of element bounds #1

Closed ebidel closed 10 years ago

ebidel commented 10 years ago

Trying to de-select the selected item, I've set selectedIndex = -1. This renders the bar outside the bounds of the element.

paperTab.selectedIndex = -1:

screen shot 2014-06-02 at 7 43 15 pm

Likewise, greater than the number of items, paperTab.selectedIndex = 4:

screen shot 2014-06-02 at 7 44 40 pm

frankiefu commented 10 years ago

Fixed. Also you should use "selected" instead of "selectedIndex" to select tab. "selectedIndex" should be used for getting the selected index, not setting it.

ebidel commented 10 years ago

Ack. Thanks frankie