Code Monkey home page Code Monkey logo

Comments (4)

matteodem avatar matteodem commented on May 17, 2024

Hello Matthias

As of now there's no documented way to do this. I'll most likely change the way of calling the API and this will be reflected in the documentation then.

Right now you can do it like this: https://github.com/matteodem/starthacking/blob/master/client/modules/searchbar/searchbar.js#L5

from meteor-easy-search.

matteodem avatar matteodem commented on May 17, 2024

I'll keep this open until there's a "real API" for it.

from meteor-easy-search.

MatthiasEckhart avatar MatthiasEckhart commented on May 17, 2024

Hello,
thank you for your help! I have to update an instance, every time the search output changes. Also for "Loading…", "Search for players" and "No results found!". I already tried it with the solution you provided and with Meteor keyup events, but I didn't get the desired results, because the instance is in a stale state, until the next user input. Do you have a solution for this issue?

<template name="searchTpl">
    <div class="search-input">
        {{> esInput index="players" placeholder="Search..." }}
    </div>

    {{#ifEsInputIsEmpty index="players"}}
        <div>Search for players</div>
    {{/ifEsInputIsEmpty}}

    {{#ifEsIsSearching index="players"}}
        <div>Loading...</div>
    {{else}}
        <div class="results-wrapper">
            {{#esEach index="players"}}
                {{> player}}
            {{/esEach}}
        </div>
    {{/ifEsIsSearching}}

    {{#ifEsHasNoResults index="players"}}
        <div class="no-results">No results found!</div>
    {{/ifEsHasNoResults}}
</template>

Thanks in advance.

from meteor-easy-search.

matteodem avatar matteodem commented on May 17, 2024

hello there, this is how I implemented it: https://github.com/matteodem/meteor-easy-search#component-events.

I'll shortly add a list of possible "events" to react on. Please re-open if you have any other problems regarding this problem.

from meteor-easy-search.

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.