How can I determine which filter and filter value the user has selected?

How can I determine which filter and filter value the user has selected?

vladivladi Posts: 18Questions: 4Answers: 0

How can I determine which filter and filter value the user has selected?

This question has an accepted answers - jump to answer

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @vladi ,

    If you mean the search box then you can use search().

    If that is not what you meant can you please provide some more details and a test case. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Thanks,
    Sandy

  • vladivladi Posts: 18Questions: 4Answers: 0

    Hi @sandy,
    The user has selected a value from the filter (list), how can I determine which value he has selected? How can I find out which filter he used? Is there an event that shows the selection of the filter value?

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @vladi,

    The best way to do this is probably to write your own jQuery listener for changes on that select element. You should then be able to find the element with the selected attribute. It's not something that is built into DataTables.

    Thanks,
    Sandy

  • vladivladi Posts: 18Questions: 4Answers: 0
    edited August 2021

    @sandy thanks Sandy!

Sign In or Register to comment.