Giter VIP home page Giter VIP logo

Comments (3)

joeaudette avatar joeaudette commented on July 3, 2024

I don't consider it a bug that you have to provide routing information such as controller action and route params. you have to do that also for anchor tag why should this be any different? I don't think it should auto parse anything from the url of the current request or make any assumptions about ambient query string params.

from cloudscribe.web.pagination.

John0King avatar John0King commented on July 3, 2024

anchor tag is for a specific url: one link for one page, difference querystring might have different content. But this library Pagination is for a list to move next or forward, so it's very important to make sure it's the same list between (Next Page or Previous Page) and current Page. Another reason is that to preserve the search queryString in action,viewBag,and Pagination for every action is very hard (multi search box).

(John0King@0836ecd)

from cloudscribe.web.pagination.

joeaudette avatar joeaudette commented on July 3, 2024

yes you should preserve the needed params in your viewmodel (from the current request) and use it to pass the route params to the pager, the pager should not try to guess what you want.

If you want an example, I'm using it for search in a number of places in cloudscribe Core project, for example in role administration to search for roles and role members and role non members. In all cases I'm providing the needed route parameters to the pagertaghelper from my viewmodel

Example view, viewmodel, controller

it is your job to pass what you need for routing it is not the job of the pagertaghelper to try to guess it.

if you want that you can always fork the project and implement it as you think it should be

from cloudscribe.web.pagination.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.