searchbuilder
searchbuilder
jmclamen
Posts: 15Questions: 8Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
i have 2 pb:
1/ searchbuilder condition dosn't translate un french?
2/ I want to be able to select conditions for each data. for example: for my data "NAME" only "Equal" and "not". For "FIRST NAME" only "begins with". It's possible?
Answers
Hi @jmclamen ,
columns.searchBuilderType
and then declaring custom conditions for that custom type insearchBuilder.conditions[type]
. Take a look at this example which does just that. You will need to make 2 custom column types, and grab the functions that you need from theCriteria
class.Hope this helps,
Sandy
hi,
i don't interstand how we can use the french translation plugin? How install it?
tky
jm
Hi @jmclamen ,
You can load it in by setting the
language.url
option to point at the file on our cdn. Take a look at this example showing the defaults.Thanks,
Sandy
Hi,
I'am trying to remove conditions on a type by type basis as in the example above. It works when added as button in the dom: 'Qfrtip'. But if dom: 'Bfrtip' and you add it to
buttons: ['searchBuilder'] custom conditions are not displayed and only appear the default ones.
Is it a bug or I am doing wrong?
@aparreno12 We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Sorry for my mistake, I send you an example. As you can see removing conditions and setting column selector to search only in some columns are not working. Changing searchBuilder from buttons: ['searchBuilder'] to dom: 'Qfrtip', makes it working again.
I forgot the example
That's a pretty convincing test case - thanks for that. I've raised it internally (DD-2484 for my reference) and we'll report back here when there's an update - probably in a couple of days.
Cheers,
Colin
Hi @aparreno12 ,
When configuring SearchBuilder as a button you need to set the SearchBuilder config within the button as shown by this example. I've updated your test case and you will see that it is now working fine.
Thanks,
Sandy