Condition value missing in request
Condition value missing in request
Hi,
I'm using jQuery DataTables version 1.11.3 and Search Builder version 1.3.0. I'm forcing the user to press enter on each search (with option search: return). When I add a condition, do not press the enter key, add a second condition and then press the enter key, the second condition value is added to the request. The first condition is added without a value.
In the image below you can see that the request contains the Firstname without a value:
https://ibb.co/tqM2ZLb
To reproduce this issue:
- Open this url in your browser: https://wpdataaccess.com/search-builder-demo/
- Click ADD CONDITION
- Select Firstname / Contains / jose (do NOT press enter)
- Click ADD CONDITION
- Select Lastname / Contains / toll
- Press enter
This result is confusing for the user. Is there a way to force the Query Builder to add all values to the request is the user presses the enter key in any condition?
Thanks,
Peter
Answers
Yep, agreed, the search should be considering both the conditions. I've raised it internally (DD-2453 for my reference) and we'll report back here when there's an update.
Cheers,
Colin
Thank you Colin
Hi @Peter Schulz ,
That should be the issue fixed now. This will be available in the next SearchBuilder release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds.
Thanks,
Sandy
Hi Sandy,
Great you fixed it. I can confirm the nightly build is working correctly. I'm pulling the files from cdn so I'll wait for the next release. Looking forward!
Thank you,
Peter
Hi Sandy,
I updated my CDN link to use version 1.3.1, but get the same issue.
The fix works with the 1.3.1 nightly build:
https://cdn.datatables.net/searchbuilder/1.3.1/js/dataTables.searchBuilder.min.js
But not with the CDN 1.3.1:
https://cdn.datatables.net/searchbuilder/1.3.1/js/dataTables.searchBuilder.min.js
Any ideas?
Thanks,
Peter
Hi @Peter Schulz ,
SearchBuilder hasn't had another release since this fix was made. Also, those two links are the same... Did you mean the below?
https://nightly.datatables.net/searchbuilder/js/dataTables.searchBuilder.js
You can use it until the next release is made.
Thanks,
Sandy
Hi Sandy,
Sorry, looks like I copied the same URL twice. Yes, I meant that link. Will this fix be added to 1.3.1? Or the next release?
Thanks,
Peter
That will be in the next release, 1.3.1 was built in January. You can use those nightly builds until the release made. I've started to notify releases on our Twitter feed,
Colin
It works!
Thank you so much guys,
Peter