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

AutoSuggestBox dynamic T #441

Closed
adpmhel24 opened this issue Jul 27, 2022 · 8 comments · Fixed by #509
Closed

AutoSuggestBox dynamic T #441

adpmhel24 opened this issue Jul 27, 2022 · 8 comments · Fixed by #509
Labels
enhancement New feature or request

Comments

@adpmhel24
Copy link

Please add AutoSuggestBox in version 4.

@bdlukaa
Copy link
Owner

bdlukaa commented Jul 27, 2022

It is implemented. Check the example app!

@adpmhel24
Copy link
Author

It is implemented. Check the example app!

I check in the example in version prerelease autosuggestionbox accepts only string in items property

@adpmhel24
Copy link
Author

Screenshot_2022-07-27-22-22-56-66_40deb401b9ffe8e1df2f1cc5ba480b12

Here's the example

@bdlukaa bdlukaa added the enhancement New feature or request label Aug 4, 2022
@bdlukaa
Copy link
Owner

bdlukaa commented Aug 4, 2022

It's a String by design, since AutoSuggestBox uses a TextField, which can only handle strings.

@adpmhel24
Copy link
Author

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

@henry2man
Copy link
Contributor

@bdlukaa Related with #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?

@bdlukaa
Copy link
Owner

bdlukaa commented Sep 2, 2022

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

henry2man added a commit to henry2man/fluent_ui that referenced this issue Sep 3, 2022
@henry2man
Copy link
Contributor

I've done a proposal in #509

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants