Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchBuilder JSON Error: Cannot create property 'searchBuilder' on string #296

Open
Shtreel opened this issue Oct 18, 2024 · 1 comment

Comments

@Shtreel
Copy link

Shtreel commented Oct 18, 2024

I get an error when converting the data sent to the server to JSON. Based on the documentation here https://datatables.net/reference/option/ajax.data, it should be possible to convert to JSON by doing
new DataTable('#myTable', { ajax: { url: 'data.json', contentType: 'application/json', type: 'POST', data: function (d) { return JSON.stringify(d); } } });
However, this doesn't work when SearchBuilder is enabled which causes a "Cannot create property 'searchBuilder' on string" error. This issue was mentioned in https://datatables.net/forums/discussion/76987/searchbuilder-criteria#latest, but there doesn't seem to be a fix other than modifying the source code to remove the line that gets SearchBuilder details

@AllanJard
Copy link
Contributor

Thank you - I missed that thread. I'll try and look into it next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants