matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
438 stars 68 forks source link

Allow LoadMore button HTML content #597

Closed Roshdy closed 7 years ago

Roshdy commented 7 years ago

First, thanks for the great package.

That said, would you please do me a favor and modify this file

to be:

<template name="EasySearch.LoadMore"> {{#if moreDocuments}} <button {{attributes}}>{{html content}}</button> {{/if}} </template>

to allow html content (i.e. icons --> <i class="fa fa-spinner"></i>)

example: JS Template.searchbox.helpers({ loadMoreContent: function(){ return '<i class="fa fa-spinner"></i> <span>More...</span>'; } });

HTML {{> EasySearch.LoadMore index=productsIndex attributes=loadMoreAtts content=loadMoreContent}}

matteodem commented 7 years ago

Please create a PR if you want to see changes in the code.