Hello Matteo!
I tried the package - it works great! Thank you!
Sorry for stupid question I’m newbie in Meteor.
I would be very appreciate if you give me a little advice or right direction with it...
My page has search area in navigation bar template "(navbar") and content in another template ("main").
Is it possible to show search results in “main" template when using search input in “navbar" or to ties templates somehow?
Something like that:
<template name="navbar">
{{> EasySearch.Input index=playersIndex }}
</template>
<template name="main">
<ul>
{{#EasySearch.Each index=playersIndex }}
<li>Name of the player: {{name}}</li>
{{/EasySearch.Each}}
</ul>
</template>
// On Client and Server
let Players = new Mongo.Collection('players'),
PlayersIndex = new EasySearch.Index({
collection: Players,
fields: ['name'],
engine: new EasySearch.Minimongo()
});
// On Client
Template.main.helpers({
playersIndex: () => PlayersIndex
});
Yes it is, simply use the components and write everything as you would without EasySearch and then add the EasySearch.Input where you would want the search input to be.
Hello Matteo! I tried the package - it works great! Thank you! Sorry for stupid question I’m newbie in Meteor. I would be very appreciate if you give me a little advice or right direction with it...
My page has search area in navigation bar template "(navbar") and content in another template ("main"). Is it possible to show search results in “main" template when using search input in “navbar" or to ties templates somehow?
Something like that: