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

fix: force position in FluentSelect #3358

Closed
mdtal opened this issue Feb 14, 2025 · 6 comments
Closed

fix: force position in FluentSelect #3358

mdtal opened this issue Feb 14, 2025 · 6 comments
Labels
needs: repro code or repository The provided description or code is insufficient to repro the issue

Comments

@mdtal
Copy link

mdtal commented Feb 14, 2025

🐛 Bug Report

With FluentSelect, I set the bound value of a to null to reset my drop down to the unchosen placeholder value without re-initializing the Items.
Doesn't seem to work with new release.

💻 Repro or Code Sample

seems your example page for Forms & Inputs -> List -> Select -> Forced Position is also not working

🤔 Expected Behavior

it used to reset the dropdown to virgin state with the placeholder shown

😯 Current Behavior

now it just stays on the selected item

💁 Possible Solution

🔦 Context

holding on this release

🌍 Your Environment

  • OS & Device: Windows 11 PC, Visual Studio 2022, Blazor Wep App Core 8
  • Browser Chrome 132.0.6834.197
  • .NET Core 8.0.406
  • Fluent UI Blazor library Version 4.11.4
@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Feb 14, 2025
@vnbaaij
Copy link
Collaborator

vnbaaij commented Feb 14, 2025

Sorry, but you are describing an issue and then in the repro step you are talking about something completely different.

We need clear, ready-to-run reproduction steps and code. Standard reply below:


Please supply us with ready-to-run reproduction code in the form of something we can copy/paste, a (zipped) project structure or a GitHub repository.

We do not have capacity to craft or compose a reproduction for every issue that gets raised.

If no code or repository is provided, this issue will be closed in 3 days

Help us to help you. Thanks.

@vnbaaij vnbaaij added needs: repro code or repository The provided description or code is insufficient to repro the issue and removed triage New issue. Needs to be looked at labels Feb 14, 2025
@mdtal
Copy link
Author

mdtal commented Feb 14, 2025

ok, using the Blazor Web App Template in VS2022, I created BlazorApp1
had to add "@using Icons = Microsoft.FluentUI.AspNetCore.Components.Icons" to the _Imports.razor
copied code from your web page into Home.razor

@page "/"

<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>

Welcome to your new Fluent Blazor app.
<FluentDivider />
<br />  

@* Code from https://www.fluentui-blazor.net/Select#forcedposition *@

<h4>Forced position above</h4>
<FluentSelect Position="SelectPosition.Above" @bind-Value="@selectValue" TOption="string">
    <FluentOption>Position forced above</FluentOption>
    <FluentOption>Option Two</FluentOption>
</FluentSelect>

<h4>Forced position below</h4>
<FluentSelect Position="SelectPosition.Below" @bind-Value="@selectValue" TOption="string">
    <FluentOption>Position forced below</FluentOption>
    <FluentOption>Option Two</FluentOption>
</FluentSelect>

@code {
    private string selectValue { get; set; }
}

I would expect that selecting "Option Two" from the above box would force the below box to "Option Two" also.
It does not, but it used to work before Version 4.11.4

BlazorApp1.zip

@vnbaaij
Copy link
Collaborator

vnbaaij commented Feb 14, 2025

Maybe it worked like that before but that was then an unexpected side effect.
With the code as you have it above, it won't work like that. None of the options has an actual value so @bind-Value won't do anything. There is no binding taking place.

@vnbaaij vnbaaij closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2025
@mdtal
Copy link
Author

mdtal commented Feb 14, 2025

since this code was copied from your example website, maybe you should change the site?

@vnbaaij
Copy link
Collaborator

vnbaaij commented Feb 14, 2025

Why? It is not supposed to show/do what you are describing. It is to show you can force the list to display above or below the input box.

@mdtal
Copy link
Author

mdtal commented Feb 14, 2025

I am old and you are correct, my bad and much thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: repro code or repository The provided description or code is insufficient to repro the issue
Projects
None yet
Development

No branches or pull requests

2 participants