Never Post Memes

    @domodel/paginator

    1.0.13 • Public • Published

    domodel-paginator

    Pagination system for domodel.

    Getting started

    Installing

    npm install @domodel/paginator

    Usage

    import { Core, Binding } from "domodel"
    import { Paginator, PaginatorModel, PaginatorBinding, ItemBinding } from "@domodel/paginator"
    import FruitModel from "/model/fruit.js"
    
    export default class extends Binding {
    
      onCreated() {
    
        const paginator = new Paginator(5)
    
        this.run(PaginatorModel, {
          binding: new PaginatorBinding({ paginator })
        })
    
        paginator.emit("itemsSet", [
          {
            model: FruitModel,
            binding: ItemBinding,
            properties: { name: "Red" }
          },
          {
            model: FruitModel,
            binding: ItemBinding,
            properties: { name: "Pink" }
          },
          {
            model: FruitModel,
            binding: ItemBinding,
            properties: { name: "Green" }
          }
        ])
        
      }
    
    }

    Keywords

    none

    Install

    npm i @domodel/paginator

    DownloadsWeekly Downloads

    1

    Version

    1.0.13

    License

    MIT

    Unpacked Size

    36.7 kB

    Total Files

    26

    Last publish

    Collaborators

    • thoughtsunificator