Instantsearch.js: InfiniteHits : specify CSS class for "show more" button

Created on 26 May 2017  路  9Comments  路  Source: algolia/instantsearch.js

Do you want to request a feature or report a bug?

A feature

Feature: What is your use case for such a feature?

I would like to be reuse an existing CSS class to style the button.

Feature: What is your proposed API entry? The new option to add? What is the behavior?

You could add options.cssClasses.showMoreButton option, then the classes would be added to the <button> element.

What is the version you are using? Always use the latest one before opening a bug issue.

1.11.11

API UI Feedback Widgets

All 9 comments

That could be something that we should consider cc @mthuret @ronanlevesque

If I'm not mistaken, with the IS.css new guidelines, the classname will be directly on the button and therefore the possibility of overriding it with an option will derive from it. Is it correct? @bobylito @ronanlevesque
cf: https://instantsearch-css.netlify.com/widgets/infinite-hits/

That is correct. The available classes will be .ais-InfiniteHits-loadMore and .ais-InfiniteHits-loadMore--disabled.

Hey, it's been a year, and it's still something that I have to work-around... Any idea of when it'll be possible?

We are currently in the process to implement the IS.css guideline to InstantSearch. It will be possible to provide this CSS class in the upcoming version. But we don't have any ETA on it.

Would you accept a patch PR in the meantime?

Sure go for it!

Close with #3026.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mthuret picture mthuret  路  3Comments

ChristopherDosin picture ChristopherDosin  路  4Comments

nicosrugeris picture nicosrugeris  路  3Comments

object505 picture object505  路  4Comments

bobylito picture bobylito  路  3Comments