Git Product home page Git Product logo

Comments (4)

guxuerui avatar guxuerui commented on June 10, 2024 1

I think that there is no event named @change, maybe you can use the event @update:modelValue, and then you can get the changed page number~

from balm-ui.

HDShabe avatar HDShabe commented on June 10, 2024

I've just tried with @update:modelValue over @change and that seems to work. Following this, can we then remove the @change even from the documentation including the examples? It causes some confusion.

To go back to my other question, am I using pagination correctly?

As a side question, how was the pagination/datatable intended to be used? Currently I send the page number and results per page to the server and paginate there, just sending back the information for the current page.

Is this correct, or would the intended use to be send the entire dataset back and have the datatable work out what it wants to currently display from the full dataset?

I haven't looked at the inner workings of the datatable, but for example if I give it 100 results and set it to 10 results per page on the control, it still just displays all of them, so I'm assuming i'm correct in paginating the data on the server?

Cheers

from balm-ui.

elf-mouse avatar elf-mouse commented on June 10, 2024

Hi @HDShabe , Documentation errors have been fixed. Thank you very much~

And pagination component, in general only need to use page, total and pageSize three parameters to control the front-end display. like this:

<ui-pagination v-model="page" :total="total" :page-size="pageSize"></ui-pagination>
  • page and pageSize need to be passed to the back-end api
  • total must be returned by the server

from balm-ui.

HDShabe avatar HDShabe commented on June 10, 2024

Perfect, thanks for you support @elf-mouse, that's how I had it set up.

Cheers.

from balm-ui.

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.