Giter VIP home page Giter VIP logo

md-collection-pagination's People

Contributors

jonatanklosko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

md-collection-pagination's Issues

Missing LICENSE

LICENSE file should be added to repository and also mention used license in README.md

itemsPerPage updating erroneously after changing its value

I've got a pagination problem after I've selected a new itemsPerPage value on a dropdown. After the second page, all my items in collection were being shown.

That problem occurs in the update function (line 190-194). When the code slices the array for the new paginatedCollection, the code was concatenating the offset with the new perPage value (since it was binded to an ng-model).

To solve it, I've just added a parseInt() to the this.perPage variable.

line 193:
this.paginatedCollection = this.collection.slice(offset, offset + parseInt(this.perPage));

That solved for me. If this is the best solution and you want to commit to the code that would be nice!

And thanks a lot for your directive. I was looking for one just like this one!!

Visible list not updated with filter function

I used a filter function within the ng-repeat and the visible list didn't update after the filter. Let's say that I had a list of 15 objects and I filtered one that was on the last page. All the objects were gone and the pagination gave me 2 pages of empty list and the last page with the single object.

Sorry that this time I cannot suggest a correction but it is too much reverse engineer lol.

Here is the simplified version of the code that I've used:

<md-list-item ng-repeat="object in tc.uiObjectList | filter:tc.objectsFilter">

<md-collection-pagination collection="tc.objectList" paginated-collection="tc.uiObjectList" per-page="tc.entitiesPerPage"></md-collection-pagination>

        vm.objectsFilter = function(item) {
            if (item.shortName.search(new RegExp(vm.entitySearch, "i")) >= 0) {
                return true;
            }
            return false;
        };

collection list is not reactive

We are seeing an issue where our data is loaded after the page is loaded, and vm.items is not updating. Can we alter/add more data to "vm.users" after the page has loaded? (need to make API calls to actually GET the data before displaying it).

Our data looks like this (not simply an array of Strings), its an Array of Objects.


$scope.playlists = [ 
{name:"asdf", id:"19ahd",}, 
{name:'asdf2', id:'123'},
];

Cant manually specify the "total number of items"

I have a long list and I let the backend to handle the pagination. I need to manually specify the "total number of items" but it is automatically derived from collection's length. I dont know if this is on this project's specs but it might be a good feature to add.

Bower package?

Seems like this main repo has only npm install and not eg, bower.

Is there some reason for lacking bower package?

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.