Git Product home page Git Product logo

angular-data-table's People

Contributors

agenestar avatar alexbainter avatar amcdnl avatar benbrostoff avatar btmarkyou avatar gitter-badger avatar hypercubed avatar jdehaan avatar jnelson avatar jsheely avatar kharitonoff avatar kuzman avatar marjan-georgiev avatar marti4ka avatar miparnisari avatar mrumberto avatar thrilleratplay avatar toast254 avatar tristanpendergrass avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-data-table's Issues

scrollHelper take the wrong input element

I have two table in one screen.
table1 and table2.
scrollHelper have only one instance for both tables.
if I click the page 2 in table 1 it change the table 2 results.

Expressive Components

Expressive components is a interesting approach to component design. So rather than have 1 element thats on the page, you have a expressive markup that would represent what you would be composing in the model. For example:

<data-table>
   <data-table-header>
       <data-table-header-col can-resize="true">{{money}}<data-table-header-col>
  </data-table-header>
  <data-table-body>
    <data-table-body-row ng-repeat="row in rows">
        <data-table-body-cell>
            {{row.name}}
        </data-table-body-cell>
    </data-table-body-row>
  </data-table-body>
</data-table>

There are a few challenges when going down this route such as transclusion, scoping, dealing with our complicated layouts and keep the api easy.

Simpler grid project implementing this: https://github.com/daniel-nagy/md-data-table

Readme refers to missing file

./release/data-table.min.js mentioned in the readme does not exist.

In addition, the files are named a little bit different too (data-table.js in readme, dataTable.js in folder).

cellRenderer - value object not available

templates.html

value - not rendering.

cellRenderer: function(){ return '<div><img width="30" height="30" src="http://thecatapi.com/api/images/get?format=src&type=gif"> <strong>{{value}}</strong></div>';
}

double click event

As far as I know you don't have a double click event, I tried on-row-double-click but it doesn't work.
Is there a plan to include this?
thanks

bower support

NPM and JSPM already works, but bower is not supported. Is there a special reason for it?

I use bower because not every library uses npm and I don't want to integrate two different package manages for my frontend.

What do you think?

Error in console when cellRenderer contains ng-if

I don't know if this is a bug or not, since this works ok when ng-show is used instead of ng-if, but just in case: When cellRenderer contains something like this, with ng-if:

cellRenderer: function() {
        return '<b ng-if="value">{{value}}</b>';
}

And this appears down in the list so you need to scroll down to see it, then several errors are thrown:
"TypeError: Cannot read property 'insertBefore' of null"

See this codepen. Scroll down to around row 20, "Barry Page", and check the console.

Get rid of reliance on separate icons file?

It would be nice if there was no reliance on a separate icons css file. Since the only thing icons are used for at the moment is the sort (that I know of) maybe you could just use pseudo selectors to do the job like so:

.icon-down {
    position: relative;
    left: 10px;
    &:after {
        content: '';
        position: absolute;
        display: block;
        width: 10px;
        height: 1px;
        background: gray;
        transform: rotate(45deg) translateX(-5px);
    }
    &:before {
        content: '';
        position: absolute;
        display: block;
        width: 10px;
        height: 1px;
        background: gray;
        transform: rotate(-45deg) translateX(5px);
    }
}
.icon-up {
    position: relative;
    left: 10px; top: -8px;
    &:after {
        content: '';
        position: absolute;
        display: block;
        width: 10px;
        height: 1px;
        background: gray;
        transform: rotate(-45deg) translateX(-5px);
    }
    &:before {
        content: '';
        position: absolute;
        display: block;
        width: 10px;
        height: 1px;
        background: gray;
        transform: rotate(45deg) translateX(5px);
    }
}

I can submit a PR if you want. Just let me know.

selectable = true does not fire `onSelect` callback

For some reason, when I set the options:

$scope.dtOptions = {
      selectable: true,
      multiSelect: true
}

the onSelect callback is fired, however if I disable multi-select and have just:

$scope.dtOptions = {
      selectable: true
}

the `onSelect callback never fires. Is this by design or a bug? To me, it seems like very odd interface.

Faster vertical scrolling

Created a new branch for vertically scrolling performance. https://github.com/Swimlane/angular-data-table/tree/scroll-perf

I bypassed the digest cycle by removing the watch https://github.com/Swimlane/angular-data-table/blob/scroll-perf/src/components/body/BodyController.js#L30

and directly calling the update from the scroller directive https://github.com/Swimlane/angular-data-table/blob/scroll-perf/src/components/body/ScrollerDirective.js#L29

then instead of moving each row as you scroll like i did here: https://github.com/Swimlane/angular-data-table/blob/scroll-perf/src/components/body/BodyController.js#L312

I only move 1 div that contains all the rows : https://github.com/Swimlane/angular-data-table/blob/scroll-perf/src/components/body/BodyDirective.js#L22 and then here https://github.com/Swimlane/angular-data-table/blob/scroll-perf/src/components/body/ScrollerDirective.js#L30

Its still not perfect as the top row is rendered twice and it scrolls odd and it is a TAD faster but not much. Frustrating since that is totally bypassing digests and reducing the number of watchers by a LOT. The facebook react table is still WAYYY faster ( or appears to be ) as seen in https://facebook.github.io/fixed-data-table/example-object-data.html ... when look at when you scroll, there is never a blank space

They use synthetic scrollbars, Im wondering if they are throttling your scroll velocity so it can always stay in sync?

TODO: Apply this similar concept to #8 but could be tricky since I will need to watch all cells to accomplish the same thing.

Virtual pagination links don't work in demos

When I clone the project and run it locally, the demos/paging.html has links in the bottom-right and they update as I scroll, but clicking the links doesn't change / jump the scroll position. Is this by design? The same is true of the codepen demo, http://codepen.io/marjan-georgiev/pen/vOebGw, with the following additional problems:

  • Sometimes the data doesn't load
  • Sometimes pagination doesn't trigger on scroll

My main concern is getting virtual pagination working, let me know if this is a code change. Debugging the project locally, I see

<li ng-repeat="pg in pager.pages track by $index" ng-class="{ active: pg.active }" class="ng-scope">
            <a href="" ng-click="pager.selectPage(this, pg.number)" class="ng-binding">17</a>
          </li>

putting a debug statement in PagerController.js at line 60 (selectPage function) it doesn't appeared to be called when I click it.

Install from npm requires jspm?

sh: jspm: command not found
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "angular-data-table"
npm ERR! node v0.12.5
npm ERR! npm  v2.10.1
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] postinstall: `jspm install`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'jspm install'.
npm ERR! This is most likely a problem with the angular-data-table package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     jspm install
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-data-table
npm ERR! There is likely additional logging output above.

Tests

Need E2E and Unit Tests

unable to install, npm license expired

the jspm and npm installtions both fail one way of another, and getting the zip from github then trying to get gulp working is a nightmare. Really want to try this project, but cant build it.

Link inside row

Cant navigate clicking a link inside the rows.
Placing a "A" tag with either href or s-ref leads to the same result.

Also, if you click inside the table, hitting F5 to refresh doesnt work.

It looks like its preventing or something like that.

Support Expressive Columns Inside Parent Directives using Transclusion

From a chat with @amcdnl a few days back:

Angular has pulled transclude as the last param in a directive compile block, making it so that the place where columns are being stored in element.columns (here) is lost because transclusion pulls this out of the template and then replaces it via a "clone" type action. Since the element is cloned and re-created in the transclusion process, that means the arbitrary data stored in the DOM is lost.

We should consider handling this a different way so that the expressive columns don't break with transcluded parent directives.

Keyboard Navigation on Virtual Table

When using a virtual table, you can use the keyboard to navigate up/down the rows. However, when navigating when you hit the bottom of the visible rows, it no longer works.

prop does not work as element attribute

prop attribute does not work, see this codepen

<dtable options="options" rows="data" class="material">
      <column name="iName" prop="name" width="200"></column>
      <column name="iCompany" prop="company" width="200"></column>
</dtable>

CellRenderer doesn't work with ng-click.

*cellRenderer: function(scope,elm) {
if(scope.row.types === 'SINGLE')
return '{{value}}';
else
return <md-button ng-click="showAccountHolder(this,$event)">{{value}}</md-button>;
}

ng-click - doesn't call the scope function showAccountHolder.

Make parent scope accessible from row templates?

So I spent a long while today tinkering and integrating the data table. Really like the direction but I'm not sure I might have a showstopper feature need. Is there an undocumented feature that allows me to call parent controller functions? I'm looking at the RowDirective and it looks like you're doing isolate scope and not doing bindToCotnroller. I'm guessing this would be not only a significant refactor, but also a sort of "policy change" from a design direction, so I'm not sure you're interested in going this direction with the project. I have an <md-menu> with a number of contextual menu items for deleting, updating, and renaming the item in the row where the dropdown button is located.

pagination doesn't work without scrollbar.

Hi,

table not loading when scrollbarV option set to false.

image

System.import('data-table').then(function(dt){
var module = angular.module('app', [ dt.default.name ]);
module.controller('HomeController', function($scope, $http){
var data;
$scope.options = {
rowHeight: 50,
headerHeight: 50,
footerHeight: 50,
columns: [
{ name: "Name", prop: "name" },
{ name: "Gender", prop: "gender" },
{ name: "Company", prop: "company" }
],
columnMode: 'force',
scrollbarV: false,
paging: {
externalPaging: true
}
};
$scope.paging = function(offset, size){
$http.get('/demos/data/100.json').success(function(d) {
$scope.options.paging.count = d.length;
var set = d.splice(offset, size);
if(!$scope.data){
$scope.data = set;
} else {
// only insert items i don't already have
set.forEach(function(r, i){
var idx = i + (offset * size);
$scope.data[idx] = r;
});
}
console.log('paging!', offset, size)
});
};
});

  });

Multiple Sorts don't work right

When you have multiple sorts going using client-side sorting, it doesn't work quite right. Perhaps we should only have 1 sort available.

CHANGELOG.md

Would be nice to see whats new with v0.3 (and other new versions in the future).

Error when prop contains an object

For one of the columns I have not a value, but an object with some properties, and I would like to use it like this:

{
      name: "Logged In",
      prop: "userinfo",
      width: 200,
      cellRenderer: function() {
        return '{{value.loggedIn}} ';
      }
}

But this gives an error: Error: [jqLite:nosel] http://errors.angularjs.org/1.3.14/jqLite/nosel

This codepen demonstrates the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.