The Wayback Machine - https://web.archive.org/web/20220213100644/https://github.com/dotnet/aspnetcore/issues/40185
Skip to content
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

Generate dictionary keys in blazor @bind #40185

Open
1 task done
ctigrisht opened this issue Feb 13, 2022 · 0 comments
Open
1 task done

Generate dictionary keys in blazor @bind #40185

ctigrisht opened this issue Feb 13, 2022 · 0 comments

Comments

@ctigrisht
Copy link

@ctigrisht ctigrisht commented Feb 13, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I would like to propose that @bind="MyDictionary[keyVariable]" creates the key in dictionary, please check the following example

@foreach(var obj in List)
{
    <input @bind="Data[obj.Id]"/>
}

@code{
    Dictionary<string, string> Data = new ();
}

Describe the solution you'd like

I would like the blazor to dynamically create keys from a @Bind

Additional context

No response

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

Successfully merging a pull request may close this issue.

None yet
1 participant