Giter Site home page Giter Site logo

gdepourtales / ng-cells Goto Github PK

View Code? Open in Web Editor NEW
77.0 77.0 17.0 1.13 MB

AngularJS Table directive that draws a table of data with different features

Home Page: http://gdepourtales.github.io/ng-cells/

License: Other

JavaScript 94.69% CSS 0.11% HTML 5.20%

ng-cells's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ng-cells's Issues

Updating cell data from async event

I've noticed that if I update my data array after the grid is rendered, the changes are not reflected in the grid.

I was able to find a way to fix this by adding a third argument to the $scope.$watch() call in ng-cells.js (line 1064).

                    scope.$watch(
                        'data',
                        function(newValue, oldValue) {
                            if (newValue !== oldValue ) {
                                scope.$$updateScrollPositions(oldValue);

                                // Update the data
                                scope.$$updateData();

                                // Refresh scrollbars
                                scope.$$refreshScrollbars();

                            }
                        }, true // add true here to watch value change
                    );

Ref: http://stackoverflow.com/a/17795221/4296434

Rearraging columns

It would be nice to have the ability of rearranging columns with drug and drop event on both touch and ordinary devices.

bower.json angular configuration not compatible with using 1.2 angular

I am developing against angular 1.2 with these bower dependencies:

"dependencies": {
"angular": "1.2.x",
"jquery": "1.10.2",
"json3": "~3.3.0",
"es5-shim": "~4.0.0",
"bootstrap": "~3.3.1",
"angular-animate": "1.2.x",
"angular-cookies": "1.2.x",
"angular-loader": "1.2.x",
"angular-resource": "1.2.x",
"angular-route": "1.2.x",
"angular-sanitize": "1.2.x",
"angular-touch": "1.2.x",
"ng-cells": "0.3.10"
},
Running bower install errors out because ng-cells angular dependencies resolve to the latest 1.3 angular modules. I am currently working around this problem by first installing the angular components and then installing ng-cells as a second step.

Question: Scrollbars on the main window.

Really like it.

Question: How would I use this, so that the scrollbars are not on the table itself, but on the main window, so lets say, table (400x400, top: 200, left: 300) and window (1200X720, document width/height includes tables actual width/height, 5000x6000). And I want to scroll thought table with main scrollbars of the window.

Merge Cells

Hello,

We have rowspan / colspan options for merging Cells in HTML Tables...

Can you please bring that in ng-cells as well.

Thanks and Regards,
Raj

Dynamic ranges

Basically, I would like to be able to add rows dynamically that have a custom html template, i.e. I would like to create a ngc-range whose bottom boundary evolves in time.

The problem is that the range is registered once (addParent function in ngcRange directive) and any subsequent modification to the range is ignored.

I think I'm left with two options :

  1. Create a new range for each new row (maybe that would work with ng-repeat or something)
  2. Modify the library to store the ranges in a way that updating them is possible.

Any advise on that ?

Set scrollbars to window

Is it possible to set scrollbars to window instead of table? I have a table inside the main content and I scroll the table with window scrollbars (it took some time to develop that).

Any possibility?

Content of cells is not re-rendered on data update after scrolling

After scrolling the cells based on certain data, I am updating the data on which the cells are rendered. I see that it triggers a watch on which scope.$$updateData is called. However, the content of the cells is not re-rendered, therefore it still shows the old data. When I then scroll, the table is re-rendered and the new data object is shown.

Actually, it seems like on the change of data, it is re-rendering the cells outside the view but not the cells that you are viewing. If I havent used scrolling at all, everything is fine.

I am using the lastest version of ng-cells.

Mousewheel scrolling not working on FireFox & Safari (Windows 8.1)

I am very pleased with your ng-cells directive: it's high performant and flexible, much better than other jquery or ng stuff that I have tried. There is just one issue that I would like you to know: the mouse wheel scroll on the table works on Chrome, IE and Opera but not on FireFox 37.0.1 nor on Safari 5.1.7 (on Windows 8.1). Mousewheel in Safari on the Mac works fine. Any ideas how to fix that?

Fix styles on IE

As per angularjs guidelines, style binding is not working on IE. Template needs binding on ng-style to make this work properly.

Trying to figure out a solution on my own.

I think the main problem should be merging cell, row and columns styles; this could be done in ng-style by binding to a function, but rendering performance would suffer a lot.

What I'm trying to do is creating a new version calculating ng-style objects inside $$getCellData function.

Custom HTML Template Directive

The custom html function (custom-html-fn) callback can embed a directive but the directive is not evaluated afterwards. This limits the possibility of adding custom functionality via directives or other modules.

checkboxes in cells

I am using the custom template directive to include a template into each cell.
The template has a checkbox with a custom directive.
When I check the checkbox, it fires an event which tells me the row/col of the cell containing the checkbox.

However, when I scroll down, the checkbox in the visible cell remains checked even though the table should have scrolled the checked checkbox out of view.

Why do you think this might be happening?

Fixed path for releases

When using a ng-cells with bower one have to change the path on every and each release.

Could you provide a /dist/ng-cells.js /dist/ng-cells.css that is a fixed path.

Inner Div styles can't be overwritten when using percentages

The inner div created within each cell (div cell-content or custom-cell-template etc.) has the styles of the td added to them.
However, when using styles such as width if you specify the width in percentages then the inner div gets the same value.
Therefore, if the td width is 20% wide, then the inner div style will get 20% width.
The problem with this approach is that the inner div percentage is relative to the TD and is therefore too small.

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.