javve / list.js

The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.
https://listjs.com
MIT License
11.2k stars 896 forks source link

Filter list from parent class #642

Open gregBerthelot opened 5 years ago

gregBerthelot commented 5 years ago

Hi

Is possible to filter a list using the class of a parent item if child item has a different class. Say in the example below I'd like to filter

var list = new List('myList', {
  valueNames: ['classToUse'],
});

in

<ul class="list">
  <li class="classToUse"><span class="uk-label-primary">item 1</span></li>
  <li class="classToUse"><span class="uk-label-secondary">item 2</span></li>
  <li class="classToUse"><span class="uk-label-primary">item 3</span></li>
</ul>

Thanks for your help

gregBerthelot commented 5 years ago

@javve any chance to get help?

mhulse commented 4 years ago

Any luck? This seems like a useful feature.