Skip to content

A bug fix for InputSelect binding for Guid and int data types #17126

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

Closed
wants to merge 1 commit into from
Closed

A bug fix for InputSelect binding for Guid and int data types #17126

wants to merge 1 commit into from

Conversation

mansabbloch
Copy link

With this fix InputSelect binding is working perfect for Guid? Guid int? and int data types.

Summary of the changes (Less than 80 chars)
Detail: I compared targetType with Guid and int and provided parsing for the types.

Addresses #9939

With this fix InputSelect is working perfect for `Guid?` `Guid` `int?` and `int` data types.
@mansabbloch mansabbloch changed the title A bug fix for InputSelect binding for Guid and int data types #9939 A bug fix for InputSelect binding for Guid and int data types Nov 15, 2019
@Pilchie Pilchie added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Nov 15, 2019
@javiercn
Copy link
Member

@mansabbloch thanks for your pull request.

We can't take this change in its current form, as it's missing test coverage. If you are willing to add functional tests for this, we will be happy to accept the PR.

@mkArtakMSFT mkArtakMSFT added area-blazor Includes: Blazor, Razor Components and removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels Nov 27, 2019
@mkArtakMSFT
Copy link
Contributor

Thanks for your PR, @mansabbloch.
Do you plan to handle the requested changes here or should we close this?

@marinasundstrom
Copy link

marinasundstrom commented Jan 16, 2020

I have tested the fix. Forked in for my own use,

In my case, I had an with an empty Value (””) as my default item.

It works in the other cases. However, the defaullt value of Guid causes the field to not select the first item because it is not compatible.

My solution was to assign Guid.Empty as the Value for that firat item. Then it gets selected in a clean state.

I’m unsure whether it should treat Guid.Empty as ””, and vice versa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants