Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Mandeep Singh Gulati
    @mandeepm91
    @LelouchVlBritannia Check out AngularJS documentation on how to create an app and then how to create controller. Also check on how to link them with your HTML view. That should fix it
    read about ng-app and ng-controller
    RS
    @LelouchVlBritannia
    Thanks @mandeepm91. I will check it out
    I got it working on my local machine
    Mandeep Singh Gulati
    @mandeepm91
    great!. Good luck
    RS
    @LelouchVlBritannia
    Thanks :)
    mwithington
    @mwithington

    Hi i have a quick question about the custom pagination docs in angular smart table, it appears that on your site it is currently broken. I did at one point develop a custom pagination like this before

    <nav ng-if="pages.length >= 2">
    <ul class="pagination">
    <li><a ng-click="selectPage(1)">First</a>
    </li><li><a ng-click="selectPage(currentPage - 1)"><</a>
    </li><li><a> {{currentPage}} of {{numPages}}</a>
    </li><li><a ng-click="selectPage(currentPage + 1)">></a>
    </li><li><a ng-click="selectPage(numPages)">Last</a></li>
    </ul>
    </nav>

    Erik Idland
    @eaidland
    Hi! How do I get all items in rowCollection that is "isSelected"?
    getSelectedRows = function() { var selected; return selected = $scope.rowCollection.filter(function(item) { if (item.isSelected === true) { return logger.debug('selected ' + item); } }); };
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    Is there a way to make sort globally accessible?
    Currently the sorting seems to be case insensitive, but not doesn't work as expected with European accented chars.
    .
    let's say :
    hello, Hello, Hfllo, Hëllo (ë: 0xEB in unicode)
    ideally this is sorted as
    hello
    Hello
    Hëllo
    Hfllo
    .
    Because ë is e, so should come before f, but shown like
    hello
    Hello
    Hfllo
    Hëllo
    Eirik Brandtzæg
    @eirikb
    How does standard JavaScript sort handle the chars?
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9

    Good question, not in a way i'm looking for:
    arr.sort(['hello', 'Hello', 'Hfllo', 'Hëllo']);

    returns:
    ["Hello", "Hfllo", "Hëllo", "hello"]

    Eirik Brandtzæg
    @eirikb
    That might be the problem then. Or the core of it. Now toy have something else to search for :)
    Then apply the solution to custom sorting in smart-table
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    Yep, that's the plan - looks like smart table uses Angular's orderBy
    thanks!
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    Maybe I'm not seeing it, but is there any documentation on writing custom sort for smart table? I don't want to overwrite any of angular's orderBy code. I see how to write a custom comparator here: https://docs.angularjs.org/api/ng/filter/orderBy, but not how to configure smart-table to use it
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    i think my confusion may be referencing a getter in st-sort. It doesn't look like you can pass a parameter. How do you set the value?
    Eirik Brandtzæg
    @eirikb
    @JeffUberman Have you created a custom sort? st-set-sort I think
    Or that was what you just said, perhaps I'm thinking wrong. Do you have a live demo, plunker?
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    i'm not familiar with st-set-sort, i don't see it in the docs. Is there anything you can point me towards?
    Victor Lopez
    @vlopez
    is it possible to add total row?
    Eirik Brandtzæg
    @eirikb
    @vlopez I think so, yes
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    @eirikb Thanks, I wasn't aware of the st-set-sort but found it in the source code after you mentioned it. looks like that's exactly what I need. Regarding the plnkr, it looks like the result is still sorting:
    hello Hello Hfllo Hëllo
    Is this a result of my locale or does the custom sort filter still need work?
    expected: hello Hello Hëllo Hfllo
    Eirik Brandtzæg
    @eirikb
    @JeffUberman Click on Name
    I'm not sure why it doesn't kick in initially
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    ah, my apologies! i didn't look at the html throughly enough
    thanks so much, this is exactly what I was looking for
    Eirik Brandtzæg
    @eirikb
    If you can fix the initial-problem :)
    @vlopez Something like this: http://plnkr.co/edit/DHG0E1L6oZR4on5KO7Wr?p=preview ? Note the search, the sum should update according to visible rows
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    @eirikb Does st-set-sort have to set the sort filter for the entire table or can it be used for a single column?
    Eirik Brandtzæg
    @eirikb
    I think it's for the whole table, but the column is given, so you could do a normal sort based on the column
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    I'm sorry I don't follow. I'm looking to locale search strings, default search anything else
    I can build that into my custom filter, but am curious if there's a better way through smart table
    Eirik Brandtzæg
    @eirikb
    It is possible to custom sort using st-sort, as you probably already know, but it won't give you ability to compare
    You could perhaps convert the string into a number, and return that number, but I'm not sure how
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    hmm, okay- i'll play around with it. Thanks, again, for your help
    Eirik Brandtzæg
    @eirikb
    But you can probably pipe it to Angular orderBy (instead of the a-b on line 28)
    Ghost
    @ghost~558d7c6c15522ed4b3e2dbe9
    wow, thanks so much- looks like just what i need
    mrichardsonjr
    @mrichardsonjr
    Can Smart Table be used in Angular 2?
    Victor Lopez
    @vlopez
    @eirikb Is this the correct plnkr? http://plnkr.co/edit/DHG0E1L6oZR4on5KO7Wr?p=preview
    Ramakrishnan Sathyavageeswaran
    @ramkrishs
    Hi All, i am trying to do a filter search specific to column i found this plunker example http://plnkr.co/edit/dpmSdEaL2Xuyb1BWLbVh?p=preview but how do i perform search specific to column ?
    Eirik Brandtzæg
    @eirikb
    @vlopez Yes, but I messed it up a bit by saving it when creating another example, try this one: http://plnkr.co/edit/7OHrulwoLVj0wlM4Bx0B?p=preview
    Ramakrishnan Sathyavageeswaran
    @ramkrishs
    Is it possible to add filter specific to a column outside smart table. i am trying create a filter view outside the table so that i can apply filtered search to multiple smart table
    chandanjena
    @chandanjena
    Hi, i'm very new to using the smart table in my angular page. I followed the example given in the smart table website. However, I'm not getting table row striped (as in the documentation) even of i use class="table table-striped". I have included the smart-table.js and smart-table.min.js in my index.html page.
    chandanjena
    @chandanjena
    Another question - i'm using the st-sort for sorting the table. when I click on the header field for sorting, all my data disappear. Could you please help how i can fix it.
    Brennan Govreau
    @BrennanG
    Today I was working and everything was running fine. Then I refreshed, and I'm unable to import from "http://lorenzofox3.github.io/smart-table-website/bower_components/angular-smart-table/dist/smart-table.js" in my index file. I didn't change anything in my code or my environment. Anyone know what's going on?