angular-isotope icon indicating copy to clipboard operation
angular-isotope copied to clipboard

Sort not working

Open smlombardi opened this issue 9 years ago • 3 comments

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": "[email protected]",
  "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.

smlombardi avatar Mar 14 '16 16:03 smlombardi

Having the same problem!

jrdn91 avatar Aug 08 '16 19:08 jrdn91

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

nikkialgar avatar Feb 16 '17 12:02 nikkialgar

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

Change this on line 191 and 235

nikkialgar avatar Feb 16 '17 12:02 nikkialgar