MatTab: selectedTabChange should not fire when the tab is changed programmatically
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
There should be a way to differentiate **between a UI and a programmaticcally induced tab change**. As of now, both cause the selectedTabChange: EventEmitter to emit.
My case is pretty simple: I want to display the currently opened Tab in the URL:
somePage?openedTab=1
somePage?openedTab=2
But I also want the corresponding tab to open when a URL pointing to a specific tab is navigated to. **Ideally, the [selectedIndex] input should not cause (selectedTabChange) to fire**.
Does this make sense?
Material 8.2.3, Angular 8.2.11
Contributor guide
Research direction
Start with the MatTab selectedIndex input and selectedTabChange EventEmitter behavior described in the issue. Determine how UI and programmatic changes can be distinguished, then verify that URL-driven changes do not trigger the UI-change notification while user tab changes still do.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100