Use dropdown to filter hidden column

Use dropdown to filter hidden column

guycothalguycothal Posts: 1Questions: 1Answers: 0

I am trying to figure out how to:
1. Add a dropdown between the "show entries" and "search" area
2. Hide a column that is if user is active/inactive
3. use dropdown to filter that column

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,364Questions: 26Answers: 4,956
    edited January 2023 Answer ✓

    Add a dropdown between the "show entries" and "search" area

    See this example to add custom toolbar elements.

    Hide a column that is if user is active/inactive

    Use the columns.visible init option or column().visible() to hide columns.

    use dropdown to filter that column

    Create an event handler for the select input and use column().search() in the event handler. See this example that applies filters to all columns in the footer. You will need to modify it a bit for your particular solution.

    Kevin

Sign In or Register to comment.