Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-scrollable-table

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-scrollable-table

A fixed-header scrollable table which auto-truncates overly-long headers, has resizable columns and sortable headers

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
117
decreased by-0.85%
Maintainers
2
Weekly downloads
 
Created
Source

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/

Keywords

FAQs

Package last updated on 17 Jan 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc