[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-06 Thread Alexandre Verri
How to invalidate the filter cache from the controller? Em quinta-feira, 6 de março de 2014 16h31min32s UTC-3, Alexandre Verri escreveu: > > Hi Sander, > > I've noticed that the performance is much better in the last pages. It's > due to the filter 'startFrom&

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-06 Thread Alexandre Verri
ntPage*pageSize; var end = start + pageSize; return input.slice(start, end); }; }); I've changed our fiddle to fix the problem: http://jsfiddle.net/averri/pva4z/4/ Em quinta-feira, 6 de março de 2014 15h01min16s UTC-3, Alexandre Verri escreveu: > > Sander,

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-06 Thread Alexandre Verri
Sander, your implementation is better. I'll use it and include your name as the author. I'll do a little change in order to invalidate the cache in case of $scope.data changes. Thank you very much. Regards, Alexandre Em quinta-feira, 6 de março de 2014 14h49min25s UTC-3, Sander Elias escrev

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-06 Thread Alexandre Verri
Sander, what a great implementation. It's really fast now. I was finishing another implementation, that uses a debounce function, when you sent this new version. // The new debounce filter function. var rowFilterOptimized = _.debounce(rowFilter, 100); Please, take a look on my new implementat

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-06 Thread Alexandre Verri
Hi Sander, I would like to see your implementation. By the way, I've updated my fiddle with the new filter implementation. I saw that the filter function is called 2 times for each scroll increment. Although this new fiddle has 1 million of elements, it's faster than the previous. Regarding th

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-06 Thread Alexandre Verri
Sander, thank you for your suggestions. I think that the most important thing now is to improve the performance of the table filter. The scrolling works fine even with 1 million elements, but in this case it's impossible to use in conjunction with filter. I've updated the fiddle with the new ex

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-05 Thread Alexandre Verri
I've found the problem (with the custom filter). It's fixed now: http://jsfiddle.net/averri/764tc/10/ By the way, do you know how can we add a scroll bar to the table? Em quarta-feira, 5 de março de 2014 20h18min25s UTC-3, Alexandre Verri escreveu: > > Hello, > > I

[AngularJS] Re: Paginated Scrolling - strange behavior of custom directive

2014-03-05 Thread Alexandre Verri
I've found the problem (with the custom filter). It's fixed now: http://jsfiddle.net/averri/764tc/9/ By the way, do you know how can we add a scroll bar to the table? Em quarta-feira, 5 de março de 2014 20h18min25s UTC-3, Alexandre Verri escreveu: > > Hello, > > I

[AngularJS] Paginated Scrolling - strange behavior of custom directive

2014-03-05 Thread Alexandre Verri
Hello, I've created a directive in order to do a paginated scrolling. The intention is to do a fast pagination on huge tables. It's working fine, despite the issue with the very first rendering. I've created a JsFiddle to show the strange behavior. In order to have a good performance, the pa

[AngularJS] Paginated Scrolling - Strange behavior of custom Angular directive

2014-03-05 Thread Alexandre Verri
Hello, I've created a directive in order to do a paginated scrolling. The intention is to do a fast pagination on huge tables. It's working fine, despite the issue with the very first rendering. I've created a JsFiddle to show the strange behavior. In order to have a good performance, the pa

Re: [AngularJS] Re: An interesting case about missing onclick events on DOM updates

2014-02-13 Thread Alexandre Verri
Thank you very much for the tips. I'll move to a service. I made a mistake in the calculus. The update is about 30 rows per second, in average. The max update will be 300 per second, but rarely occurs. The idea for the index is great. Every row is an object. Em 14/02/2014 02:05, "Sander Elias"

[AngularJS] Re: An interesting case about missing onclick events on DOM updates

2014-02-13 Thread Alexandre Verri
Hi Sander, please check my answers. Em sexta-feira, 14 de fevereiro de 2014 01h21min27s UTC-2, Sander Elias escreveu: > > Hi Alexandre, > > Before I give an answer to that I have a couple of questions. > >1. How large are we talking about? 1500 rows, or 15000 rows? > > It could reach 3

[AngularJS] Re: An interesting case about missing onclick events on DOM updates

2014-02-13 Thread Alexandre Verri
Hi Sander, thank you very much for your help. I added a unique ID to each object. I have another interesting case: The table gets very big, with thousands of lines. I'll add a pagination in order to avoid excessive scrolling. I need to have all data in the page, I can't use live scroll. I won

[AngularJS] Re: An interesting case about missing onclick events on DOM updates

2014-02-12 Thread Alexandre Verri
I created an example in JSFiddle, covering all the use cases from my GUI. They are working fine: http://jsfiddle.net/87xML/25/ I am glad that you have shared the information about the 'track by' feature. Regards, Alexandre Em quarta-feira, 12 de fevereiro de 2014 16h51min37s UTC-2, Sander Eli

[AngularJS] Re: An interesting case about missing onclick events on DOM updates

2014-02-12 Thread Alexandre Verri
Hi Sander, I don't know why it fails in my application. In my GUI the only way to know about an object being added or removed is observing the list. The data comes from the server via JSON. But I made a Fiddle with the scenario, and it is working fine there, please check it: http://jsfiddle.ne

[AngularJS] Re: An interesting case about missing onclick events on DOM updates

2014-02-12 Thread Alexandre Verri
The only problem with 'track by' is when there are new information in array. In this case, the new information will not be displayed. Is it possible to handle the new data? Em quarta-feira, 12 de fevereiro de 2014 15h08min41s UTC-2, Alexandre Verri escreveu: > > Hello S

[AngularJS] Re: An interesting case about missing onclick events on DOM updates

2014-02-12 Thread Alexandre Verri
Hello Sander, I was wondering if any elegant solution like this existed. Thank you very much for the information. It worked as expected. Regards, Alexandre Em quarta-feira, 12 de fevereiro de 2014 14h44min12s UTC-2, Sander Elias escreveu: > > Hi Alexandre, > > You are reassigning your arra

[AngularJS] An interesting case about missing onclick events on DOM updates

2014-02-12 Thread Alexandre Verri
Hello, I would like to share an interesting case about missing onclick events on DOM updates. In order to best describe the problem, please check the following Fiddle example: http://jsfiddle.net/87xML/13/ -- You received this message because you are subscribed to the Google Groups "Angular

[AngularJS] How to pass a binded parameter to a function

2014-02-09 Thread Alexandre Verri
Hello, I would like to pass a binded parameter to a function. The binded parameter is printed fine in HTML, but when the function is invoked the parameter is not passed. *Example, the controller code:* tigerApp.controller('TigerCtrl', function ($scope) { // Some dummy data just for