Skip to content

Update SelectExtensions to handle nested expressions where no name is parsed #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2018

Conversation

brandondahler
Copy link
Contributor

@brandondahler brandondahler commented May 31, 2018

Similar to #164 .

When calling Html.DropDownListFor(m => m, selectList), the default value from the model is not marked as selected in the provided select list because it is being guarded by a !String.IsNullOrEmpty(name) condition unnecessarily.

Test "DropDownListForUsesLambdaDefaultValueWhenNested" exercises the new functionality allowed.
The other tests added ensure no change for similar use-cases that currently work to ensure those are not broken.

@dougbu dougbu merged commit 7493846 into aspnet:master Jun 23, 2018
@dougbu
Copy link
Contributor

dougbu commented Jun 23, 2018

Thanks @brandondahler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants