Add support for views_infinite_scroll in ViewsReferencePager to allow load more paging with ajax.

Comments

miteshmap created an issue. See original summary.

miteshmap’s picture

Status: Active » Needs review
StatusFileSize
new600 bytes
seanb’s picture

Status: Needs review » Needs work

Could you add a check if the module exists before adding the pager option?

miteshmap’s picture

Status: Needs work » Needs review
StatusFileSize
new2.4 KB

@seanB thanks for noticing that, added check for moduleExists.

k_a_l’s picture

StatusFileSize
new744 bytes

I was looking for this exact support, so thank you! However, I tested a quick fix for this before checking the issue queue and after comparing it your patch, I was wondering what the reasoning was behind constructing the moduleHandler object vs using the global namespace? Is it not acceptable to do it this way (attached patch)? Thanks

Note, this applies to 8.x-2.x-dev

k_a_l’s picture

#4 works with 8.x-1.2.

miteshmap’s picture

Thanks @Kyle for verifying that. Drupal coding standard prefer to use services as dependency injection. that's why used moduleHandler object instead of calling it as needed.

k_a_l’s picture

Good to know! Thanks.

nedimtrumic’s picture

Status: Needs review » Reviewed & tested by the community

#5 :: Exactly what I needed, tested the patch and it works.

kwoxer’s picture

Hey my friends. You should better use this one as it's more flexible for the feature. And it also allows to not overwrite the pager settings. So it's not strictly restricted to infinite scroll only.

So yeah better use this:

kwoxer’s picture

Status: Reviewed & tested by the community » Fixed

I marked this as fixed by the other patch that fixes this and some more issues on this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

falco010’s picture

Can one of the maintainers re-open this issue as RTBC?

The other patch in https://www.drupal.org/project/viewsreference/issues/2932311 does not add the views_infinite_scroll option. So this patch should be committed separatly.