Replies: 1 comment
-
Answered in the created issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using the latest version of Fluent UI - 4.12.0
Using FluentCombobox component and trying to set the value of the component when an event is triggered on another component from the same page but it is not working as expected.
Code snippet:
<FluentCombobox Autocomplete="ComboboxAutocomplete.Both" @onchange="@((e) => OnRouteAutoCompleteChanged(e))" Height="150px" Width="200px"
Items = "masterRoutes" Placeholder="Filter By Route" @bind-Text="@routeName" OptionValue="option => option" OptionText="option => option">
<button type="submit" class="btn" @OnClick="ResetValue">Reset Value
code {
IEnumerable masterRoutes;
string? routeName = default!;
protected override async Task OnInitializedAsync()
{
masterRoutes = new List() { "A", "B", "C", "D"};
}
private void ResetValue() {
routeName = null; //NOT CLEARING THE COMBOBOX
}
private void OnRouteAutoCompleteChanged(ChangeEventArgs args)
{
var route = args.Value?.ToString();
}
}
Beta Was this translation helpful? Give feedback.
All reactions