When using Editor and php library the search must match

When using Editor and php library the search must match

info@i-it.seinfo@i-it.se Posts: 8Questions: 3Answers: 0
edited January 24 in Editor

So let's say i have a cell with the text: This text is great
If i'd like to find this cell i can only type in the search box the exact order: This text is great
If i type in: This great, the cell will be filtered out.

How can i solve this?
I'd like to search: This great, and find: This text is great

I'm using Datatables and Editor with data from ajax and php.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 17,754Questions: 25Answers: 4,215

    That will work by default with client side processing. That is what Datatables calls "Smart" searching. See the search() docs for details. If you are using server side processing then your server script will need to be updated to support "Smart" searching.

    Kevin

  • info@i-it.seinfo@i-it.se Posts: 8Questions: 3Answers: 0

    @kthorngren I'm using Editor and it's serverside script and it doesnt work by default.

    I have no idea where or how i should update it?

  • allanallan Posts: 57,730Questions: 1Answers: 9,203 Site admin

    If you are using the server-side processing libraries for Editor in PHP, then you can uncomment this section and it will split the input string and search across it, similar to the client-side smart search.

    Allan

  • info@i-it.seinfo@i-it.se Posts: 8Questions: 3Answers: 0
    edited January 24

    I uncomment these lines with no change. So i'm trying to figure out if i'm really using Editable.php

    Last in main page i load:
    dataTables.editor.min.js
    editor.bootstrap5.min.js

    Then in my JS i load:
    editor = new $.fn.dataTable.Editor( {
    ajax: "/app/inventory/php/inventory.php",
    AND for DataTable:
    ajax: {
    url: '/app/inventory/php/inventory.php',
    type: 'POST'
    },

    In inventory.php:
    include Editor-PHP-2.0.7/lib/DataTables.php

    and use:
    use
    DataTables\Editor,
    ....

    In DataTables.php i require:
    /Bootstrap.php

    In Bootstrap.php i'm not really sure whats going on :)

    Is any of these files loading Editor.php?
    Is the "use DataTables/Editor" loading Editor.php?

    I'm using this example:
    https://editor.datatables.net/examples/inline-editing/serverSide.html

  • allanallan Posts: 57,730Questions: 1Answers: 9,203 Site admin
    Answer ✓

    If you commented that in, did you also comment out the standard search? This block specifically? Otherwise the original search terms would still be used.

    Is any of these files loading Editor.php?
    Is the "use DataTables/Editor" loading Editor.php?

    Yes.

    Allan

  • info@i-it.seinfo@i-it.se Posts: 8Questions: 3Answers: 0

    @allan No i did not comment the other part. But now i have and now it works :)
    Thank you for this amazing software and support.
    Have a good day

Sign In or Register to comment.