Skip to content

Conversation

@MichelleRetroRabbit
Copy link
Contributor

Updated the single selection list example from a template-driven form to a reactive form.

Fixes #25894

…plating

Updated the single selection list example from a template-driven form to a reactive form.

Fixes angular#25894
@MichelleRetroRabbit MichelleRetroRabbit requested a review from a team as a code owner June 28, 2024 08:55
@MichelleRetroRabbit MichelleRetroRabbit requested review from andrewseguin and crisbeto and removed request for a team June 28, 2024 08:55
<p>
Option selected: {{shoes.selectedOptions.hasValue() ? shoes.selectedOptions.selected[0].value : 'None'}}
</p>
<form [formGroup]="form">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than replacing the example, I think we should add another one with reactive forms.

name: string;
}
/**
* @title List with single selection using a reactive forms approach
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using a reactive forms approach -> using Reactive forms

@@ -0,0 +1,33 @@
import {Component} from '@angular/core';
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MatListModule} from '@angular/material/list';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add a new line after this import.

@crisbeto crisbeto removed the request for review from andrewseguin July 24, 2024 09:06
@crisbeto crisbeto added docs This issue is related to documentation action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed labels Jul 24, 2024
@crisbeto
Copy link
Member

@MichelleRetroRabbit the change looks good, but I can't merge it in because the branch contains a merge commit. Can you drop remove it?

…plating

Added a reactive forms example to the single selection list

Fixes angular#25894
@MichelleRetroRabbit MichelleRetroRabbit force-pushed the docs_bug_mat-selection-list_example branch from f6de090 to 3bdaaa4 Compare August 6, 2024 07:47
@angular-robot angular-robot bot requested a review from crisbeto August 6, 2024 07:47
@crisbeto crisbeto merged commit 2f49eaa into angular:main Aug 9, 2024
crisbeto pushed a commit that referenced this pull request Aug 9, 2024
…mp (#29348)

* fix(material/list): Mat Selection List example is limited to html templating

Updated the single selection list example from a template-driven form to a reactive form.

Fixes #25894

* fix(material/list): Mat Selection List example is limited to html templating

Added a reactive forms example to the single selection list

Fixes #25894

(cherry picked from commit 2f49eaa)
crisbeto pushed a commit that referenced this pull request Aug 9, 2024
…mp (#29348)

* fix(material/list): Mat Selection List example is limited to html templating

Updated the single selection list example from a template-driven form to a reactive form.

Fixes #25894

* fix(material/list): Mat Selection List example is limited to html templating

Added a reactive forms example to the single selection list

Fixes #25894

(cherry picked from commit 2f49eaa)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker docs This issue is related to documentation merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs-bug(mat-selection-list): Mat Selection List example is limited to html templating

2 participants