GithubHelp home page GithubHelp logo

andrewmcgivery / ionic-ion-autolistdivider Goto Github PK

View Code? Open in Web Editor NEW
75.0 75.0 21.0 179 KB

Gives a set of directives for automatically adding in list dividers for an ng-repeat. (Works for Alphabetical or by Categories)

JavaScript 100.00%

ionic-ion-autolistdivider's People

Contributors

andrewmcgivery avatar karademada 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-ion-autolistdivider's Issues

unite digits

Hello, @andrewmcgivery your ionic-ion-autoListDivider helped me a lot, thank you.

But I faced a problem. I want combine all non letter symbols and digits under one divider.
For example I have list
a,2,c,(9),+P,s,/ff...
and I wonder to know how can I unite 2,(9),+P under one divider?

Add sticky headers

Hi,

Great work. It would be fantastic to see some performance benchmarks for this list. With that, it would be fantastic if sticky headers was added as a potential option:

Here is a demo of what I mean:
http://codepen.io/anon/pen/EawXRO

And here is the forum thread and trello board vote:
http://forum.ionicframework.com/t/sticky-list-headers/689/33
https://trello.com/c/kGTvppdl/57-ion-list-sticky-items

It'd be interesting to see if the intent of the ionic team is to pull this kind of functionality into ionic core or if they'd prefer to keep it out as plugins. There are probably pretty good arguments for both.

collection-repeat

I think it would be a good addition if it worked with a collection-repeat instead of ng-repeat.

More dividers shown than values

I currently have encoutered the following problem:
screenshot_2016-06-12-17-11-43

It seems that there are more dividers than items in the divider's list...
Is this an error or am I using the plugin in a wrong way?
Has anyone else encountered this problem?

Pull to Refresh duplicates item-dividers

Pulled this directive in, and when doing a pull to refresh on this directive with a list, it seems to duplicate the item-dividers that were initially inserted as dupes at the bottom of the list.

Feature request: Jump to section

What about adding a vertical line on the right with A-B-C etc so if user clicks on the letter it jumps to that section? This would be very useful if you have a ton of items in the list. Apple uses it for their Contacts app.

How to add a footer for each divider?

I tried adding a footer for each but it doesn't work. It doesn't work because it doesn't show up on the iOS Simulator (haven't tried on Android). If I do ionic serve (Firefox is my default browser), Firefox just freezes and I can see Firebug is counting the number of errors. I tried to debug after clicking (Debug Script from a popup) but unlike normal scenarios, it doesn't highlight exactly where the problem is.

Inside your directive, you have this if-statement:

if(divideKey != lastDivideKey) {
    var contentTr = angular.element("<div class='item item-divider'>"+divideKey+"</div>");
    element[0].parentNode.insertBefore(contentTr[0], element[0]);
    // adding a div using jQlite .after()
   element[0].after('<div></div>');
}

In your CodePen http://codepen.io/andrewmcgivery/pen/XJeQyW?editors=101 I added the same line of code (element[0].after('<div></div>');) and it appears with no problem except that it's just not the look that I want and that it only attaches on the first first item of the new divided section. But when I did the same thing and run it on the browser via ionic serve or running from Xcode to an iOS9 Simulator, the browser or nothing appears at all, respectively.

On list refresh

If you have set up your list to let you delete items from it, I've found that when the list is refreshed, the items appear at the top and then the letters appear at the bottom.

Before item was deleted:

screenshot 2015-02-22 20 06 31

After item was deleted:

screenshot 2015-02-22 20 06 40

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.