Force Search on Enter Error: Cannot read properties of undefined (reading 'toLowerCase')

Force Search on Enter Error: Cannot read properties of undefined (reading 'toLowerCase')

bbucarobbucaro Posts: 2Questions: 1Answers: 0

When search.return is set to true in the DataTables configuration, using SearchBuilder with a DateTime picker (dataTables.dateTime) on date columns triggers a JavaScript error:

Cannot read properties of undefined (reading 'toLowerCase')

As a result, SearchBuilder is unable to trigger filter. The issue also appears with other types of searches; however, in those cases pressing Enter still triggers the search. When using the calendar picker, selecting a date and pressing Enter has no effect at all.

The same behavior can be reproduced in the official example:
https://datatables.net/extensions/searchbuilder/examples/initialisation/returnSearch.html

Debugger code: ezidot

Answers

  • bbucarobbucaro Posts: 2Questions: 1Answers: 0

    Full Error Trace

    dataTables.searchBuilder.min.js:4 Uncaught TypeError: 
    Cannot read properties of undefined (reading 'toLowerCase')
        at N.updateListener (dataTables.searchBuilder.min.js:4:1)
        at N.<anonymous> (dataTables.searchBuilder.min.js:4:1)
        at dataTables.searchBuilder.min.js:4:1
    N.updateListener @ dataTables.searchBuilder.min.js:4
    (anonymous)      @ dataTables.searchBuilder.min.js:4
    (anonymous)      @ dataTables.searchBuilder.min.js:4
    setTimeout
    (anonymous)      @ dataTables.searchBuilder.min.js:4
    dispatch         @ jquery.min.js:2
    v.handle         @ jquery.min.js:2
    _writeOutput     @ dataTables.dateTime.min.js:6
    (anonymous)      @ dataTables.dateTime.min.js:6
    dispatch         @ jquery.min.js:2
    v.handle         @ jquery.min.js:2
    

    Location of the Issue

    The error occurs on line 1537 of dataTables.searchBuilder.

Sign In or Register to comment.