This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tabs): Add disabled tab + improvements (#369)
- [x] Add `disabled` tab - [x] Fix `[active]` property changes not propagating #349 - [x] Fix `mdc-tab-bar-scroller__indicator` misplaced issue #281 - [x] Remove `mdc-tab-bar-scroll-button` directive #### mdc-tab * Add `disabled: boolean` property to `mdc-tab` * Refactor `active` property * Add `changeDetection: ChangeDetectionStrategy.OnPush` * Add `preserveWhitespaces: false` * Add `getComputedWidth(): number`; return the computed width for tab. * Add `getComputedLeft(): number`; return the computed left offset for tab. * Add `isActive()` return true if tab is active. * Add `setActive(boolean)`; set tab active property to value passed. * Add `getPreventDefaultOnClick(): boolean`; return true if the tab prevents the default click action. * Add `setPreventDefaultOnClick(boolean)`; sets tabs `preventDefaultOnClick` property to the value passed. * Add `measureSelf()`; sets computedWidth and computedLeft for a tab. #### mdc-tab-bar * Add `getComputedWidth(): number` * Add `layout(): void` * Add `changeDetection: ChangeDetectionStrategy.OnPush` * Add `preserveWhitespaces: false` * Add `getActiveTabIndex(): number` * Add `switchToTabAtIndex(index: number, shouldNotify: boolean = true)` * Add `MdcTabBarIndicator` directive * Add `setPreventDefaultOnClickForTabAtIndex(index: number, preventDefaultOnClick: boolean)` * Add `isDefaultPreventedOnClickForTabAtIndex(index: number): boolean` #### mdc-tab-bar-scroller * Add `layout()` * Add `changeDetection: ChangeDetectionStrategy.OnPush` * Add `preserveWhitespaces: false` * Add `scrollBack(event?: Event)` * Add `scrollForward(event?: Event)` * Remove `mdc-tab-bar-scroll-button` directive BREAKING CHANGE: Removed `mdc-tab-bar-scroll-button` directive. Use `mdc-icon` instead. Please update your code accordingly. Example: ```html <mdc-tab-bar-scroll-back> <mdc-icon>navigate_before</mdc-icon> </mdc-tab-bar-scroll-back> ``` Closes #349 Closes #147 Closes #281
- Loading branch information
Showing
18 changed files
with
749 additions
and
326 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.