Cannot create property 'searchBuilder' on string

Cannot create property 'searchBuilder' on string

ngohangoha Posts: 3Questions: 2Answers: 0
edited June 2023 in Free community support

Error messages shown:

dataTables.searchBuilder.mjs:3388 Uncaught TypeError: Cannot create property 'searchBuilder' on string 

Description of problem:
This happens on the front end side when I set ajax.data to JSON.stringify(data) with contentType:"application/json" in order to enable serverSide processing. It seems like this is an error in the search builder package when creating searchBuilder attribute to the data while the data is being string:

this.s.dt.on('preXhr.dtsb', function (e, settings, data) {
                if (_this.s.dt.page.info().serverSide) {
                    data.searchBuilder = _this._collapseArray(_this.getDetails(true));
                }
            });

However, according to ajax document, data should be stringified so that the server can decode it. I don't know what I'm missing here.

Thank you very much for the support! Let me know if you need any other information.

Best,
Ha

Sign In or Register to comment.