-
Notifications
You must be signed in to change notification settings - Fork 461
[FluentSlider] Use current-value instead of value attribute in web component #2438
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
Conversation
|
Sorry, I don't understand the title of the PR. Can you explain what this is fixing? |
Sorry, I have made modifications to this component by referring to the title of PR #1576 Currently, binding the value property does not seem to support two-way data binding effectively. Specifically, when the value is updated externally, the UI does not reflect these changes. By switching to current-value, the correct behavior is achieved. |
|
https://explore.fast.design/components/fast-slider there is no So I think it should be Could you please suggest a more suitable title? I'm not good at English😭 |
[Fact]
public void FluentSlider_Binding()
{
// Arrange
int value = 3;
var cut = Render(@<FluentSlider Min="0" Max="10" Step="1" @bind-Value="@value"></FluentSlider>);
// Act
var slider = cut.Find("fluent-slider");
slider.TriggerEvent("onsliderchange", new ChangeEventArgs() { Value = 2 });
// Assert
Assert.Equal(2, value);
} |
|
Going with the general web components way of working, they use |
tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj
Outdated
Show resolved
Hide resolved
|
Hi, @dvoituron |
…mponent (microsoft#2438) * [FluentSlider]: by using web components current-value instead of value * fix: FluentSlider Tests * chore: Tests.csproj * Update Microsoft.FluentUI.AspNetCore.Components.Tests.csproj * add FluentSlider_Binding test --------- Co-authored-by: Vincent Baaij <[email protected]>

Pull Request
By using web components current-value instead of value
Update Tests and fixed a typo
📖 Description
🎫 Issues
👩💻 Reviewer Notes
📑 Test Plan
✅ Checklist
General
Component-specific
⏭ Next Steps