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

Allow strings as content of autosuggestion instead of objects that have to conform to TRSuggestionItem #3

Open
rickpastoor opened this issue Jun 13, 2013 · 2 comments

Comments

@rickpastoor
Copy link

That would make life easier as we could write this:

- (void)itemsFor:(NSString *)query whenReady:(void (^)(NSArray *))suggestionsReady
{
    suggestionsReady(@[@"foo", @"bar"]);
}
@troshko111
Copy link
Owner

Imagine a situation when you want to autocomplete Contacts - e.g. user types Name OR Email, you provide autocomplete items as he types. Take a look at iOS contacts autocompletion, it shows autocomplete items with name/email - 2 strings. Also, in some cases you may want to provide nice images with string, etc. It's done for flexibility, you can wrap string in object, but you can also provide more sophisticated autocomplete with Multiple strings and even images

@rickpastoor
Copy link
Author

I get that, but wouldn't it be great if both are supported?

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

No branches or pull requests

2 participants