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

Parsing html-lists in table-cells for use in filter #424

Closed
JeroenvO opened this issue Dec 5, 2017 · 1 comment
Closed

Parsing html-lists in table-cells for use in filter #424

JeroenvO opened this issue Dec 5, 2017 · 1 comment

Comments

@JeroenvO
Copy link
Contributor

JeroenvO commented Dec 5, 2017

Hi again,
I have some tables which have html-lists inside a cell like:
<td><ul><li>item1</li><li>item2</li></ul></td>
I would like the individual list items to appear in the filters, such that the filter shows 'item1' and 'item2' as distinct values. It should then be possible to filter cells that have any of the selected list-items inside the list in the cell.

I already made have a working example on https://github.com/KolibriSolutions/yadcf/blob/master/src/jquery.dataTables.yadcf.js#L2314 by adding a new html_data_type named 'multi_selector'. When i have time i will make a jsfiddle to demonstrate.
yadcf-list

Do you like this idea? If yes, i'll work it out and send you an pull request.
Thanks for yadcf anyway!

@vedmack
Copy link
Owner

vedmack commented Dec 6, 2017

Hi
I tweaked yadcf a bit to add this ability, see working jsfiddle

usage example:

yadcf.init(dtable, [{ column_number: 0, column_data_type: 'html', html_data_type: 'selector', html_data_selector: 'li' }]);

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

2 participants