Client side advanced filtering
Client side advanced filtering
TheWickerman
Posts: 3Questions: 0Answers: 0
Hello,
I have question similar to this one (https://datatables.net/forums/discussion/comment/57109), however on the client side.
I'm using dataTables to display list of users in administration. I need to filter users by their properties (admin/VIP/banned ...). These properties are saved as bit flags. So I need to check as following:
[code]
function filterCallback(userEntry) {
//Only show administrator users
return userEntry["status"]&USER_ADMIN>0;
}
[/code]
Where USER_ADMIN is some multiple of 2.
How do I do this...? Where do I apply such callback? The [url=https://datatables.net/ref#fnFilter]fnFilter[/url] does not accept functions, only strings.
PS.: I see that in the thread I referred to, user is using markup for links and inline code. However, there is no help on how to use such markup. Why he can use it and I can't?
I have question similar to this one (https://datatables.net/forums/discussion/comment/57109), however on the client side.
I'm using dataTables to display list of users in administration. I need to filter users by their properties (admin/VIP/banned ...). These properties are saved as bit flags. So I need to check as following:
[code]
function filterCallback(userEntry) {
//Only show administrator users
return userEntry["status"]&USER_ADMIN>0;
}
[/code]
Where USER_ADMIN is some multiple of 2.
How do I do this...? Where do I apply such callback? The [url=https://datatables.net/ref#fnFilter]fnFilter[/url] does not accept functions, only strings.
PS.: I see that in the thread I referred to, user is using markup for links and inline code. However, there is no help on how to use such markup. Why he can use it and I can't?
This discussion has been closed.
Replies
Allan