fluent_ui
fluent_ui copied to clipboard
AutoSuggestBox dynamic T
Please add AutoSuggestBox<T> in version 4.
It is implemented. Check the example app!
It is implemented. Check the example app!
I check in the example in version prerelease autosuggestionbox accepts only string in items property
Here's the example
It's a String
by design, since AutoSuggestBox
uses a TextField
, which can only handle strings.
I suggest if type.toString() rather than string only so that we can use models on it. Even in onChanged method I hope will pass na T object as argument. Unlike in old version we can use <T>
@bdlukaa Related with https://github.com/bdlukaa/fluent_ui/issues/244... I think this could be the latest addition in order to allow a fully replacement of Comboboxes
with AutoSuggestBox
.
I think we could have this change in AutoSuggestBoxItem
:
- old:
final String value
-->final T? value
- old: -- --> new:
final T label
What are your thoughts?
I think it's complicated. The main purpose of AutoSuggestBox is text, all callbacks are text-related. For me, it doesn't make sense to make it dynamic
I've done a proposal in https://github.com/bdlukaa/fluent_ui/pull/509