Searching for 'Reviewed' returns 'Reviewed' and 'Non-Reviewed'

Searching for 'Reviewed' returns 'Reviewed' and 'Non-Reviewed'

brooklynDadCorebrooklynDadCore Posts: 2Questions: 1Answers: 0

hi - I am trying to search my columns by 'Reviewed' and 'Non-Reviewed' status' on the each row.

Currently when searching 'Non-Reviewed' the table only displays the rows with status 'Non-Reviewed' - but when searching for status 'Reviewed' the table displays both 'Reviewed' and 'Non-Reviewed'.

This is the line of code that is calling the search, it is the same logic employed to search for 'Non-Reviewed' and 'Reviewed', this line also works as expected when searching for other terms.

angular.element(document.getElementById('table')).dataTable().api().column(3).search('Reviewed', true, false).draw();

Is there a way to expressly excluded status which are not exact matches? I did try several different regex's which did not work - like '/^Reviewed$/' and '(^Reviewed$)'

Thanks

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @brooklynDadCore ,

    That should work, see here. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

  • brooklynDadCorebrooklynDadCore Posts: 2Questions: 1Answers: 0
    edited July 2019

    Hi @colin -
    Thanks for the help, with that regex and changing some legacy code I was able to make it work.
    Thanks!
    -Scott

This discussion has been closed.