question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

More flexible data providers

See original GitHub issue

This component is helpful but it seems unnecessarily complicated to require users to create a service that implements AutoCompleteService when they may have an existing function in the parent component or another service with a name that is different from getResults.

Why not simply allow users to pass in any callback function

<ion-auto-complete [dataProvider]="mySearchFn" labelAttribute="name"></ion-auto-complete>

Where mySearchFn can be any function that accepts a string argument and returns an array?

Also, as I have in my above example, labelAttribute can be an @Input parameter of the component instead of making it a property of a service.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jaufgangcommented, Jul 11, 2017

Yes I do. This would be much simpler to use by developers, who could then re-use existing functions in their component or other services without needing to have a special service just to use this component.

0reactions
kadoshmscommented, Aug 25, 2017

Fixed e78f12eedb0546d3dda6cd317127b84a1917aeb9

Read more comments on GitHub >

github_iconTop Results From Across the Web

IBM Flexible Analytics
Models, groupers and data intelligence to help you compare the performance of network providers, drive behavioral change and close potential performance gaps.
Read more >
List of Top NoSQL Databases 2022 - TrustRadius
NoSQL Databases reviews, comparisons, alternatives and pricing. The best NoSQL Databases solutions for small business to enterprises.
Read more >
How to set up a flexible and scalable Data Analytics Platform
With big cloud providers like Amazon, Google, etc. IT services like Data ... This makes a Data Lake way more flexible than a...
Read more >
Couchbase: Best NoSQL Cloud Database Service
Couchbase is the NoSQL cloud database platform for business-critical applications. Fast with SQL familiarity and JSON flexibility. ✓ Learn more.
Read more >
What Makes A Flexible PIM Solution?
A highly flexible PIM tool enables product experience enhancement based on retailer-specific content for pinpointed results through custom ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found