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

searching in rendered with an empty string #28

Open
lorensr opened this issue Jun 20, 2015 · 1 comment
Open

searching in rendered with an empty string #28

lorensr opened this issue Jun 20, 2015 · 1 comment

Comments

@lorensr
Copy link

lorensr commented Jun 20, 2015

On https://bulletproofmeteor.com/database-modeling/building-a-real-world-search-app-meteor-package-search/2

you have

Template.searchResult.rendered = function() {
  PackageSearch.search('');
};

But when I take this line out, it seems to still work. Is this line helpful? If so, why? (And it should be added to the README if it should be there.)

@pauljohncleary
Copy link

The search won't send a request automatically, hence if you have a default set of results to show before the user types in the search box, you need to initialise the search with a blank string to get your first set of results.

If anyone has a better way of doing this let me know.

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