Do you want to request a feature or report a bug?
feature
Feature: What is your use case for such a feature?
Currently there's still a significant amount of code to write if you want to write your own pagination component.
Feature: What is your proposed API entry? The new option to add? What is the behavior?
Deal with the whole clamping, +1 / -1 and padding issue in the connector rather than the view
What is the version you are using? Always use the latest one before opening a bug issue.
2.4.1
the connector render function should give me:
active: bool or something)The widgetParams should also include:
This is probably mostly fixed by shipping https://github.com/algolia/instantsearch.js/blob/develop/src/components/Pagination/Paginator.js as part of the connector
I'm in! I agree and it fits the ALLAPITV (as little logic as possible in the view) principle :) That's a breaking change though. Maybe a candidate for the v3?
I'm not sure about it, this is view logic I think.
We provide connectors so you can create your own pagination with the raw data.
Or do you want to enhance the current connector to have an array of already generated pages?
Like I do here: https://github.com/algolia/angular-instantsearch/blob/master/src/pagination/pagination.ts#L126-L166
IMO that's very brittle logic that I'd rather have in the connector than in the widget, the one you linked seems like another implementation than the one in IS.js with Pagination.js. for exactly that reason I'd like to have this info in the connector.
I think a good option would be to make a new connector, e.g. unsafe_connectPagination() which we add for now, can be used internally by our IS implementations, or simply adding the extra info under a beta name