angular / angular/components

Angular Material tabs -Conditionally Prevent Tab switching

Open
#16,289 7 comments 9 reactions 0 assignees View on GitHub
area: material/tabs feature needs: discussion P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Feature Description

Right now I could not find a way to prevent the tab from switching.

#### Use Case

If you have a form inside the tab and want to let users know that they have unsaved changes in the form. If they say they want to stay on the tab and not switch I want to cancel the call to switch tabs.

Thank you

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Angular Material tabs implementation and its current tab-switching behavior. Define how a consumer would cancel a switch when a form has unsaved changes, then add coverage for the documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.