Skip to content

Blazor "bind" has been broken in preview 6 daily builds since May 30 #10677

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
glent1 opened this issue May 31, 2019 · 3 comments
Closed

Blazor "bind" has been broken in preview 6 daily builds since May 30 #10677

glent1 opened this issue May 31, 2019 · 3 comments
Labels
area-blazor Includes: Blazor, Razor Components question

Comments

@glent1
Copy link

glent1 commented May 31, 2019

Describe the bug

Binding using the "bind" keyword has been broken in the preview 6 daily builds since May 30. Using the @bind syntax works, but I can't find anything suggesting this should be the case

To Reproduce

Using current preview 6 daily (as below)
dotnet new blazorserverside
edit counter.razor as follows ...

@page "/counter"
<input type="text" @bind=A /><br/>
<input type="text" bind="@B" /><br/>
<input type="text" value="@C" /><br/>

Current value of A is @A <br/>
Current value of B is @B <br/>
Current value of C is @C <br/>
@code {
    string A="A";
    string B="B";
    string C="C";
}

dotnet run
navigate to counter page
change the values of the three textboxes

Expected behavior

strings A B and C all get updated when the bound textbox is updated

Actual behavior

Only A (the @Bind syntax) works correctly

Additional context

dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview6-012135
Commit: 19761f8a5c

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview6-012135\

Host (useful for support):
Version: 3.0.0-preview6-27730-01
Commit: 63abc77da6

.NET Core SDKs installed:
3.0.100-preview6-012135 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview6-19279-08 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview6-27729-07 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview6-27730-01 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview6-27730-01 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

@rynowak
Copy link
Member

rynowak commented May 31, 2019

Hi @glent1 - this is part of the directive attributes work that's shipping in 3.0 preview 6 / VS 16.2-preview 2. You can read more about this here #6364

Thanks for reaching out, this was a good reminder to me to update the issue with more details.

@rynowak rynowak added question area-blazor Includes: Blazor, Razor Components labels May 31, 2019
@glent1
Copy link
Author

glent1 commented May 31, 2019

Excellent - thanks for taking the time to reply. I guess if I'd known that they were called "directives", I'd have had more luck searching for the change!

@rynowak
Copy link
Member

rynowak commented May 31, 2019

No worries, we made up the term to explain the new feature!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components question
Projects
None yet
Development

No branches or pull requests

3 participants