Socket
Socket
Sign inDemoInstall

@vonage/vwc-pagination

Package Overview
Dependencies
5
Maintainers
51
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vonage/vwc-pagination

Pagination component


Version published
Weekly downloads
622
decreased by-7.99%
Maintainers
51
Created
Weekly downloads
 

Changelog

Source

2.45.0 (2024-02-21)

Features

  • icon: update icons set version to 4.5.0 (595efb2)

Readme

Source

vwc-pagination

vwc-pagination component dedicated to provide paged view state representation and management.

This component would be used with another, relevant, layouts, like vwc-data-grid, while both components would establish interoperability based on the APIs described here.

Structure

vwc-pagination is an inline block component.

vwc-pagination component is featured with navigational controls (move to previous page, move to next page) and a listed, ellipsed representation of pages (numeric, 1-based).

API

vwc-pagination is rolling around the total number of pages and the currently selected page.

Attributes / Properties
PropertyAttributeTypeDefaultDescription
totaltotalnumber0total number of pages, as provided by the consuming application
selectedIndexselected-indexnumber-1currently selected page; always has some numeric value except when the total is 0; number reflects a 0-based index (when the first page selected, selected equals to 0)
prev-disabledpresencemanagedan auto managed attribute for a custom styling/logic; will be placed when 'go to previous page' control should be disabled, otherwise removed
next-disabledpresencemanagedan auto managed attribute for a custom styling/logic; will be placed when 'go to next page' control should be disabled, otherwise removed

Note: if the total is adjusted to smaller number and selected appears to be out of range, the selected is set to the closest new available page (change event is fired as appropriate)

Events
EventDescription
changefired each time selected page changed (also when the initial selection happens, or when total is changed and as an outcome the selected page changed; event.detail: { selectedIndex: number; total: number })
Customization

vwc-pagination component allows customly slotted prev/next controls (see slots description below). In order to allow custom styling/behaviour of those parts, there are 2 managed component level attributes: prev-disabled / next-disabled (see above).

Slots

vwc-pagination allows the customization via the slots.

Slot nameDescription
prev-controlallows to override the default layout of the 'go to previous page' control button
next-controlallows to override the default layout of the 'go to next page' control button

FAQs

Last updated on 21 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc