angular-scrollable-table

WebJar for angular-scrollable-table

License

License

MIT
Categories

Categories

Github Development Tools Version Controls Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-alalonde-angular-scrollable-table
Last Version

Last Version

1.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

angular-scrollable-table
WebJar for angular-scrollable-table
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/alalonde/angular-scrollable-table

Download github-com-alalonde-angular-scrollable-table

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-alalonde-angular-scrollable-table/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-alalonde-angular-scrollable-table</artifactId>
    <version>1.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-alalonde-angular-scrollable-table/
implementation 'org.webjars.npm:github-com-alalonde-angular-scrollable-table:1.1.2'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-alalonde-angular-scrollable-table/
implementation ("org.webjars.npm:github-com-alalonde-angular-scrollable-table:1.1.2")
'org.webjars.npm:github-com-alalonde-angular-scrollable-table:jar:1.1.2'
<dependency org="org.webjars.npm" name="github-com-alalonde-angular-scrollable-table" rev="1.1.2">
  <artifact name="github-com-alalonde-angular-scrollable-table" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-alalonde-angular-scrollable-table', version='1.1.2')
)
libraryDependencies += "org.webjars.npm" % "github-com-alalonde-angular-scrollable-table" % "1.1.2"
[org.webjars.npm/github-com-alalonde-angular-scrollable-table "1.1.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

angular-scrollable-table

Yet another table directive for AngularJS.

This one features a fixed header that elegantly handles overly-long column header names.

Other features:

  • Scroll to row
  • Sortable header with custom comparator functions
  • Resizable columns

Installation

npm install angular-scrollable-table

OR

bower install angular-scrollable-table

Usage

angular.module('myApp', ['scrollable-table', ...]);

Example

<scrollable-table watch="visibleProjects">
  <table class="table table-striped table-bordered">
    <thead>
      <tr>
         <th sortable-header col="facility">Facility</th>
         ...
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="proj in visibleProjects" row-id="{{ proj.facility }}" 
          ng-class="{info: selected == proj.facility}" >
        <td>{{ proj.facility }}</td>
        ...
      </tr>
    </tbody>
  </table>
</scrollable-table>

where the controller contains

    $scope.visibleProjects = [{
      facility: "Atlanta",
      code: "C-RD34",
      cost: 540000,
      conditionRating: 52,
      extent: 100,
      planYear: 2014
    }, ...];
    
    $scope.$watch('selected', function(fac) {
       $scope.$broadcast("rowSelected", fac);
    });
})

Third-party dependencies:

  • jQuery
  • Bootstrap 3 CSS (for styling, optional. See the 'bootstrap2' branch also)

Demo here: https://jsfiddle.net/alalonde/BrTzg/

More infomation here: http://blog.boxelderweb.com/2013/12/19/angularjs-fixed-header-scrollable-table/

License: MIT

FAQ

  1. How do I change the height of the table?

    See here: https://jsfiddle.net/alalonde/qgc2gp7d/2/

Versions

Version
1.1.2