MatTab: selectedTabChange should not fire when the tab is changed programmatically
未关闭
area: material/tabs
feature
P3
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
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
贡献指南
调研方向
从 issue 中描述的 MatTab 的 selectedIndex input 和 selectedTabChange EventEmitter 行为入手。确定如何区分 UI 变更和程序变更,然后验证由 URL 驱动的变更不会触发 UI 变更通知,而用户进行的标签页变更仍会触发该通知。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100