Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort not working #56

Open
smlombardi opened this issue Mar 14, 2016 · 3 comments
Open

Sort not working #56

smlombardi opened this issue Mar 14, 2016 · 3 comments

Comments

@smlombardi
Copy link

If I try to implement your sort by, I get an angular error. Filtering works fine.

  <div class="btn-group" opt-kind="sortBy" ok-key="sortBy">
      <button type="button" class="btn btn-default" ok-sel=".name">Name</button>
      <button type="button" class="btn btn-default" ok-sel="[date]" ok-type="integer">Date</button>
  </div>

my dataset includes items like

{
  "name": "Mail Intelligence",
  "category": "presort",
  "date": "1360412309421",
  "url": "http://www.google.com",
  "username": "user@name.com",
  "password": "p@55w0rd",
  "description": "Lorem ipsum dolor sit amet consectatur adaptec ilipsing."
},

but i get an error in console and the whole thing fails if I include the sort button group above.

TypeError: $elem.find is not a function

The problem is in the button itself. I can add the button group:
<div class="btn-group" opt-kind="sortBy" ok-key="sortBy"></div>

But when I add the button itself, it dies:
<button type="button" class="btn btn-default" ok-sel="[date]" ok-type="integer">Date</button>

If I remove the sort button block and only keep the filter buttons, at least that part works.

@jrdn91
Copy link

jrdn91 commented Aug 8, 2016

Having the same problem!

@nikkialgar
Copy link

Sadly I am also having the same problem here. Did anybody reach any conclusions?

@nikkialgar
Copy link

Changing $elem to $($elem) converts it to a jQuery object and the buttons do work now.

Change this on line 191 and 235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants