SearchBuilder Predefined Search does not work with Button Implementation
SearchBuilder Predefined Search does not work with Button Implementation
jaygrayson
Posts: 17Questions: 3Answers: 0
Link to test case:
This is without button implementation, showing working:
https://codepen.io/p2g-jaygrayson/pen/yLprJdr
This is with button implementation, showing not working:
https://codepen.io/p2g-jaygrayson/pen/PoEgGoR
Description of problem:
When using the Button implementation, SearchBuilder does not honor the Predefined Search.
Replies
Well, my colleague found the answer to this one. I updated the second CodePen, that I labeled as showing not working.
https://codepen.io/p2g-jaygrayson/pen/PoEgGoR
The issue was that the predefined criteria needs to be declared inside the button initialization, not the searchbuilder config.
That's it, yep, glad all sorted,
Colin
I have a problem that seemed like this one but the solution doesnt work for me. Im using server side tables and no filter is sent to the backend from the predefined setup.
I'm in a button (similar to the OP), so it looks like this:
The preDefined option doesn't seem to do anything. What I see at the server is no searchBuilder at all:
When done through the interactive searchBuilder I see something more expected:
Any ideas would be helpful.
Defining the predefined criteria in the buttons config works here:
https://live.datatables.net/yuyohuvi/1/edit
Notice there are two ajax requests. The first is the standard SSP request and the second is the request with the predefined criteria. If this doesn't help then please post a link to your page or a test case replicating the issue so we can help debug.
Kevin