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 🙏

© 2024 – Pkg Stats / Ryan Hefner

bmz-datatable-bs4

v1.0.11

Published

Angular Datatable Bootstrap 4

Downloads

82

Readme

Bamossza Datatable Bootstrap 4

Angular Datatable Bootstrap 4

alt bmz-logo

support angular 6 or above for developer.

Prerequisites

The project should be using bootstrap 4 already.

Installing

Easily a step by step will be:

Datatable Core and Jquery

npm i jquery
npm i datatables.net-bs4       
npm i datatables.net-fixedcolumns-bs4
npm i datatables.net-fixedheader-bs4
npm i datatables.net-rowgroup-bs4

Bmz Lib

npm i bmz-datatable-bs4

In the root project, Open angular.json file.

Look up Styles[] add below.

"styles": [
    "src/styles.scss",
    "node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css",
    "node_modules/datatables.net-fixedcolumns-bs4/css/fixedColumns.bootstrap4.css",
    "node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.css",
    "node_modules/datatables.net-fixedheader-bs4/css/fixedHeader.bootstrap4.css"
]

Look up Script[] add below.

"scripts": [
    "node_modules/jquery/dist/jquery.min.js",
    "node_modules/datatables.net/js/jquery.dataTables.js",
    "node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js",
    "node_modules/datatables.net-fixedcolumns/js/dataTables.fixedColumns.js",
    "node_modules/datatables.net-fixedcolumns-bs4/js/fixedColumns.bootstrap4.js",
    "node_modules/datatables.net-fixedheader/js/dataTables.fixedHeader.js",
    "node_modules/datatables.net-fixedheader-bs4/js/fixedHeader.bootstrap4.js",
    "node_modules/datatables.net-rowgroup/js/dataTables.rowGroup.js",
    "node_modules/datatables.net-rowgroup-bs4/js/rowGroup.bootstrap4.js"
]

How to using


Bmz Lib is an auto create table body, following below.

Attr >> bmzDatatableBs4

const rows = [
{
    order: 1,
    orderName: 'Coffee'
},
{
    order: 2,
    orderName: 'Tea'
}];

-------------------------

const columns = [
{
    data: 'order',
    class: 'text-center'
},
{
    data: 'orderName'
}];

-------------------------

<table bmzDatatableBs4
    [fixedColumn]="true"
    [fixedColumnLeft]="2"
    [rows]="rows"
    [columns]="columns"
    id="table-fixed-columns"
    class="table table-striped table-bordered"
    style="width:100%">
    <thead>
        <tr>
            <th>Order</th>
            <th>Order Name</th>
        </tr>
    </thead>
    <tbody></tbody>
</table>

Attribute can used

| Ng Attr | Type | Default | | :--- | :---: | :---: | | id (Required) | string | | | class | string | | | groupColumn | number (Start 1) or string | | | hideColumn | number (Start 1) | | | fixedHeader | boolean | false | | fixedHeaderOffset | number | 0 | | fixedColumn | boolean | false | | fixedColumnLeft | number (Start 1) | 0 | | fixedColumnRight | number (Start 1) | 0 | | searching | boolean | true | | paging | boolean | true | | order | Array<[number, string]> (Start 0) | [[0, 'asc']] | | orderFixed | Array<[number, string]> (Start 0) | false | | scrollX | boolean | false | | scrollY | string | 300px | | scrollCollapse | boolean | false | | rows | Array | [] | | columns | Array<[data: string, class: string]> | [] |

Example

Fixed Header when down ↓ scrollbar

alt bmz-logo

Row Group

alt bmz-logo

Changelog

Learn about the latest improvements.

Authors

Further information

Profiles