list.js icon indicating copy to clipboard operation
list.js copied to clipboard

Filtering fails on <span> without class

Open cdekkers opened this issue 6 years ago • 2 comments

I have set up a list with list items that contain the following structure:

<div class="activity-header">
	<span class="h6" data-filter-by="text">John Doe</span>
	<span data-filter-by="text">posted an update in the team</span>
	<a href="#" data-filter-by="text">The Substantial Turtles &#x1F422;</a>
</div>

In addition, I have a filter <input> that I use to pass a filter string.

I have found that text filtering does not work on the second <span> element as long as it does not have a class attribute set. Thus, during filtering, the above code will not include the text in the second <span> element, but if I change the element like so,

<span class="random" data-filter-by="text">posted an update in the team</span>

then the input filter does work on the element. What's going on?

cdekkers avatar May 03 '19 20:05 cdekkers

Hi,

Was this problem solved?

Kaj80 avatar Jul 06 '22 13:07 Kaj80

Not to my knowledge. For what it's worth, I'd adivise you not to use list.js anymore, at least not in a production environment, because it is not maintained anymore.

cdekkers avatar Jul 09 '22 19:07 cdekkers