• This repository has been archived on 31/May/2021
  • Stars
    star
    365
  • Rank 114,372 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight, dependency-free javascript HTML table plugin

Vanilla-DataTables

Build Status npm version license Average time to resolve an issue Percentage of issues still open


Due to time constraints this repo is no longer maintained. Please use the official fork over at fiduswriter/Simple-DataTables


A lightweight, extendable, dependency-free javascript HTML table plugin. Similar to jQuery DataTables, but without the dependencies.

Features

  • Sortable columns
  • Pagination
  • Searchable
  • Customisable layout
  • Customisable labels
  • Customise column rendering
  • Load data via AJAX requests
  • Export to common formats like csv, txt json, and sql
  • Import csv and json data
  • Control column visibility
  • Reorder or swap columns
  • moment.js integration for sorting columns with datetime strings
  • Extentable with custom plugins See the wiki (v1.6.0 and above)

Documentation | Latest Version


Demos


Install

Bower

bower install vanilla-datatables --save

npm

npm install vanilla-datatables --save

Browser

Grab the files from one of the CDNs and include them in your page:

<link href="https://unpkg.com/vanilla-datatables@latest/dist/vanilla-dataTables.min.css" rel="stylesheet" type="text/css">
<script src="https://unpkg.com/vanilla-datatables@latest/dist/vanilla-dataTables.min.js" type="text/javascript"></script>

//or

<link href="https://cdn.jsdelivr.net/npm/vanilla-datatables@latest/dist/vanilla-dataTables.min.css" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/vanilla-datatables@latest/dist/vanilla-dataTables.min.js" type="text/javascript"></script>

You can replace latest with the required release number.

CDNs courtesy of unpkg and jsDelivr


Quick Start

Then just initialise the plugin by either passing a reference to the table or a CSS3 selector string as the first parameter:

var myTable = document.querySelector("#myTable");
var dataTable = new DataTable(myTable);

// or

var dataTable = new DataTable("#myTable");

You can also pass the options object as the second paramater:

var dataTable = new DataTable("#myTable", {
	searchable: false,
	fixedHeight: true,
	...
});

Don't forget to check the wiki out for further help.


If this project helps you then you can grab me a coffee or beer to say thanks.

paypal


Copyright © 2017 Karl Saunders | MIT license

More Repositories

1

Pageable

Create full page scrolling web pages. No jQuery.
JavaScript
368
star
2

Selectr

A lightweight, vanilla javascript select box replacement. No dependencies.
JavaScript
311
star
3

Selectable

Touch enabled selectable plugin inspired by the jQuery UI widget.
JavaScript
142
star
4

xperience

XP Ranking System for FiveM
Lua
66
star
5

rprogress

Customisable radial progress bars for FiveM
JavaScript
65
star
6

MiniBar

A lightweight scrollbar library written in vanilla javascript.
JavaScript
58
star
7

bulletin

Customisable notifications for FiveM
Lua
52
star
8

esx_xp

XP Ranking System for FiveM
Lua
44
star
9

vPrompt

3D Interactive Prompts for FiveM
Lua
35
star
10

ms-spycams

Deployable spy cameras for QBCore
Lua
26
star
11

Rangeable

Transform input range elements into something prettier and more configurable.
JavaScript
18
star
12

Editable

A table editor extension for Vanilla-DataTables.
JavaScript
16
star
13

esx_forklift

ESX forklift job for FiveM
Lua
14
star
14

FeedM

Customisable native feed notifications for FiveM
Lua
13
star
15

vInspector

Vehicle inspector for FiveM
Lua
12
star
16

esx_collectables

Collectable items for FiveM
Lua
11
star
17

NestableJS

JS library for drag & drop hierarchical lists
JavaScript
11
star
18

Exportable

A Vanilla-DataTables extension to allow for exporting table data to various formats.
JavaScript
7
star
19

Selectable-Table-Plugin

Plugin for Mobius1/Selectable that enables fast column / row selection.
JavaScript
7
star
20

AnimateUI

Animated UI Messages for FiveM
Lua
6
star
21

MetroCQL

MetroCQL - Metro Conquest Large
Lua
3
star
22

XpM

Framework agnostic XP ranking system for FiveM
Lua
3
star
23

GForceM

Vehicle G-Force meter for FiveM
Lua
3
star
24

Filterable

Vanilla-DataTables extension that adds inputs to each column for filtering.
JavaScript
2
star
25

VXCR

Virtual Xbox CD Ripper. Transfer audio files to your Xbox without having to rip from a CD.
Visual Basic
2
star
26

collectathon

Collectable items for FiveM
Lua
1
star