-
Notifications
You must be signed in to change notification settings - Fork 389
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
FluentTextField ignores DataList property #1215
Comments
Sorry, but you will have to supply a bit more details... Please provide us with minimal code (either something we can copy/paste or a repository) to make the issue observable/reproducable |
I created repository with simple app that shows the problem. Here is the code:
For raw html input datalist property is working.
|
Yes, it doesn't seem to work the same way. |
Closing this as a workaround is avaialble by using |
In my use case, if I want simple "combobox-like" functionality with data on a remote server I have these challenges:
The approach to using each of the 3 input types to accomplish something trivial in concept has a variety of friction, pain points, and outright broken functionality. We go through the effort of documenting these because we want to provide ample information and evidence for this project and parent projects to improve. It seems hasty to jump straight to closing this issue when the bug very much is valid and reproducible. If the issue is going to be closed, at least remove the "DataList" attribute from the public API so others don't follow in our footsteps. 😥 Why even report the bug if it's going to be closed within hours and ignored?
If the API is public/present, why we discouraged from using it as it was intended to be?? @dvoituron |
It was not being ignored. @dvoituron provided a workaround for the openers issue. |
@au5ton Why did you said " Using this small example, you can inject the text written by the user ( <FluentAutocomplete TOption="string"
OnOptionsSearch="@OnSearchAsync"
MaximumSelectedOptions="1"
@bind-SelectedOptions="@MyValues" />
@code
{
IEnumerable<string>? MyValues;
void OnSearchAsync(OptionsSearchEventArgs<string> e)
{
var items = new List<string>() { "One", "Two" };
if (!string.IsNullOrEmpty(e.Text))
items.Insert(0, e.Text);
e.Items = items;
}
} |
@dvoituron In the example provided, there are a couple problems:
|
@au5ton Hi Austin, Going with the issue in the FAST repo and the replies, I'm adding an adapted version of John's reply to the This is the code I used:
Which gives the following result: Would this work for your use case? |
@vnbaaij Thank you, that should work well. This is much appreciated! Hoping to see this in the next patch release. ❤️ One thing I noticed was that this will only happen if a re-render happens within the Blazor lifecycle. If JavaScript modifies the |
Fix #1226: Add Element to AutoComplete TextField
I want to connect FluentTextField component with data list.
I created dataList with proper id and several options, and set this is in FluentTextField DataList property.
But no options appeared when i clicked on FluentTextField.
However when i use regular html input component datalist worked properly.
The text was updated successfully, but these errors were encountered: