Closed howardgod closed 5 years ago
Could be a bug in Autocomplete. Can you first try to change the TextField
and ValueVield
to something like this:
TextField="@((item)=>item.Name)"
ValueField="@((item)=>item.UserId)"
The "@user is List<string>
". So there's no Name or UserId fields. Does Data field only accept those complex type like following?
class User
{
public string Name {get;set;}
public string Id {get;set;}
}
I only assumed it was a complex object since that was the intended was of using the autocomplete. But I think it should still work with regular List<string>
.
I will look more into this but keep in mind that I'm still actively working on version 0.8 of Blazorise. It is going to be pretty big upgrade so it will take a while until I release it.
I change to complex type, can't work still. thanks for your time. no rush. :)
After checking the source code, I feel like the problem is the <Text Edit Text="@SelectedText"/>
under <Dropdown>
component.
The SelectedValue is not the same property as SelectedText. So when user changes SelectedValue, it won't affect the SelectedText
Any update on how to clear the Autocomplete component?
@camping89 Setting the SelectedValue
should work. Can you create a new ticket with the code to reproduce it issue on our side?
@howardgod hey man , you can do this....i have the same problem on 1.0.1 , i need clean the autocomplete value / text on edit template for grid , but its imposible
@stsrki comment should work, this is an old issue, I'll be opening a new one to investigate this.
@howardgod hey man , you can do this....i have the same problem on 1.0.1 , i need clean the autocomplete value / text on edit template for grid , but its imposible
Add this to your Autocomplete component:
@bind-SelectedText="@selectedReviewer"
I tried following code, but the selectedValue still there. I also try with SelectedValue and SelectValueChange way, still fail. Any tips to accomplish this?