searchbuilder

searchbuilder

jmclamenjmclamen 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

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @jmclamen ,

    1. Have you imported the french translation plugin?
    2. It is possible to remove conditions on a type by type basis - see the docs here. It is also possible to set conditions on a column by column basis by declaring a custom columns.searchBuilderType and then declaring custom conditions for that custom type in searchBuilder.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 the Criteria class.

    Hope this helps,
    Sandy

  • jmclamenjmclamen Posts: 15Questions: 8Answers: 0

    hi,

    i don't interstand how we can use the french translation plugin? How install it?

    tky

    jm

  • sandysandy Posts: 913Questions: 0Answers: 236

    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

  • aparreno12aparreno12 Posts: 4Questions: 0Answers: 0

    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?

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    @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

  • aparreno12aparreno12 Posts: 4Questions: 0Answers: 0

    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.

  • aparreno12aparreno12 Posts: 4Questions: 0Answers: 0

    I forgot the example

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    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

  • sandysandy Posts: 913Questions: 0Answers: 236

    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

Sign In or Register to comment.