Giter Club home page Giter Club logo

Comments (3)

spinach avatar spinach commented on July 20, 2024

Hey @aleincerto,

Thanks for contacting us. I investigated the above and this is definitely a valid point you're making. What you're trying to do is currently not documented, and we'll make sure to add this soon.

So to answer your question:

The addResultHandler is one way to do it indeed.

In order to do make it work with custom widgets, you need your custom widget to implement the protocol SearchableMultiIndexViewModel, which basically requires you to add a property searcherIds: [SearcherId]. You need to fill this property with the indices that you want the widget to "tune into". When you do so, the on() method should be called for all the indices specified. Note that you'll also need to implement func configure(withSearchers searchers: [Searcher]), but you can leave it empty if you don't need to use the searchers associated to that widget.

Also note that as soon as you're using multi-indexing with InstantSearch, then your custom widget will have to implement SearchableIndexViewModel in case they're targeting only 1 index (what I explained right above is for multiple indices). Here you'll have to add the property searcherId: SearcherId and implement func configure(with searcher: Searcher).

Thanks again for reporting this and let us know if you face any issue.

from instantsearch-ios.

aleincerto avatar aleincerto commented on July 20, 2024

Thanks a lot for the help! I might come back to you with some other questions later on. This InstantSearch framework is really good, nice stuff that you have going on in here. Keep it up.

from instantsearch-ios.

spinach avatar spinach commented on July 20, 2024

Thank you for the nice comment! Make sure to contact us if you face any other issues, we're always looking for feedback and ways to improve the library.

from instantsearch-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.