-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to address paper-tabs issues (#1048)
* remove unused properties * only shows inkBar if we have selected tab position Doing this avoid, on render where the selected tab is NOT the first tab, to have the inkBar quickly starting from offset 0 to the actual selected tab. * ensure newOffset is always set * only have width/left for tab * reverse shouldPaginate condition By defaults, assume this is true. * the newOffset fallback should be its current position * remove 'didRender' hook in paper-tab This is unnecessary because we already have the hook in paper-tabs that: - is always called after one of the tab didRender - calls 'updateDimensions' on all of its children * make it possible for shouldPaginate to toggle value * it appears to be unnecessary to do the work in didInsert As it will be done directly after in didRender * add comment * remove unnecessary fixOffset in selectedTab observer Because didRender will be called and will call this method too. * correct movingRight that may be undefined Because when navigating there is a render without any selected tab * add test for md-left/right on ink bar * remove unused import * do not use computed property for _selectedTab Because we pass 'selected' to each of them, updating the selected tab will invalidate all the 'isSelected' property which will trigger an validation of _selectedTab (thus observer callback) for each nested tab * correct indentation * remove unnecessary observer * use computed property for paginationStyle * do not try to correct offset for each didRender event Only do it in two occasions: - first render - selected tab was updated Otherwise it will prevent user's pagination as the selected tab will become partially hidden. * ensure 'fixOffsetIfNeeded' is not called against destroyed component * execute resize event in current runloop * fix nextPage pagination when the current tab's width is greater than canvas * fix previousPage when some tabs have bigger width than canvas size
- Loading branch information
1 parent
4a82506
commit 71f0bb1
Showing
4 changed files
with
95 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters