gdepourtales / ng-cells Goto Github PK
View Code? Open in Web Editor NEWAngularJS Table directive that draws a table of data with different features
Home Page: http://gdepourtales.github.io/ng-cells/
License: Other
AngularJS Table directive that draws a table of data with different features
Home Page: http://gdepourtales.github.io/ng-cells/
License: Other
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
);
When scrolling horizontally, sometimes the scroller starts to act strange, but that happens only when you scroll to the very right.
I am using 0.3.3 version, because of the smooth scrolling, but I got this issue also with the new version.
You can check the demo: test/test-noscroll.html (no vertical scroll)
Here is a video:
http://screencast.com/t/WmtmmPWa8mmG
It would be nice to have the ability of rearranging columns with drug and drop event on both touch and ordinary devices.
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.
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.
I wrote a simple app using ng-cells. It works well in Chrome, FireFox and Safari under Mac OS. The scrollbar fails to appear in iPad Safari.
It is doing jumps, do I have to add some sort of property to enable smooth scrolling like here http://gdepourtales.github.io/ng-cells/?
Can you please give me some update soon, this is the only thing that is bugging be :(.
No one of examples is scrolling smooth :(.
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
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 :
Any advise on that ?
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?
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.
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?
The example on the homepage is using a former version of ng-cells.
Also include the header the usage of sanitize.
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.
First of all, thank you very much for creating and sharing ng-cell!
I am ocassionally getting this error, but not able to isolate it cause. Any suggestion?
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.
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?
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.