npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

datatables.net-staterestore

v2.1.1

Published

StateRestore for DataTables

Readme

StateRestore for DataTables

StateRestore is a state management UI for DataTables. It allows users to create multiple table states which can be saved and then reloaded at any time. This is particularly useful for complex tables where specific views are common and the user might wish to toggle between states.

States can be saved locally, or for a more permanent part of your table's features, to a remote database via Ajax, which also provides the ability for users to share states.

Features

StateRestore provides the following features to enhance a DataTable:

  • Two state management interfaces to suit your needs:
    • Table based
    • Dropdown list based
  • Default state for when a table is loaded
  • First class Ajax storage
  • Optional sharing of states
  • Customisation of which table settings are saved
  • Comprehensive API
  • Full support in our server-side libraries

And more! As with all DataTables extensions it can of course have all language strings localised, has complete documentation, and has styling integration with all of the DataTables supported styling libraries (e.g. Bootstrap, Bulma, Fomantic UI and others).

Installation

The easiest way to install any extension for for DataTables, including StateRestore, is with the download builder. With the download builder, you select the styling and aspects of DataTables suite that you want, and it will generate the packages / install commands for you to use.

The download builder includes options for direct loading with script and link tags, details for using a package manager such as npm and NuGet, or a download option if you wish to have the files locally.

Basic Usage

In its most simple case, you can enable StateRestore by simply setting stateRestore: true as an option in the DataTables initialisation.

new DataTable('#example', {
	layout: {
		topStart: {
			buttons: ['stateCreate', 'statesList', 'pageLength']
		}
	},
	stateRestore: true
});

Note that you will typically use one of statesList or statesTable in the buttons array with the Buttons extension, as these define the UI that the end user will interact with. stateCreate is another common StateRestore button to use at the top level. This and the list view are used in the example above.

Documentation / Support

License

This software is released under the DataTables Plus License. To use the software a license key must be applied - see DataTables Plus.