Fix snippets pagination

Rémy Coutable requested to merge 22500-can-t-paginate-through-snippets into master

What does this MR do?

If fixes the snippets pagination which was AJAXified recently. /cc @smcgivern

Are there points in the code the reviewer needs to double check?

Not sure if we could do better?

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #22500 (closed)

Merge request reports