This topic contains 7 replies, has 3 voices, and was last updated by Jai Jai 3 months, 2 weeks ago.

datatable search wildcard


  • csotomon
    Participant

    Posts: 9
    Member Reply #13404

    Does the datatable plugin have support for wildcards in search function?

    I need to filter all the values that have part of the input in the complete word.

     

    Sean
    Sean
    Keymaster

    Posts: 4380
    Support Staff Reply #13445

    Hi,

    You can refer to the datatables.net plugin documentation:
    https://datatables.net/

    Also you can refer to this related discussion:
    https://datatables.net/forums/discussion/5024/possible-to-do-wildcard-filtering

    Thanks.


    csotomon
    Participant

    Posts: 9
    Member Reply #13634

    Could you give me an example with Angular 5?

     

    Sean
    Sean
    Keymaster

    Posts: 4380
    Support Staff Reply #13637

    Sorry, we do not have example for this in Angular and you will need to implement it your own. Our support here covers only the theme related questions and 3rd party plugins support are not covered. I hope for your understanding on this.


    csotomon
    Participant

    Posts: 9
    Member Reply #13646

    But according to the documentation in  http://keenthemes.com/metronic/documentation.html#sec14-1 datatable is a Metronic’s custom plugin defined in src/js/framework/components/general/datatable.js

    So, I hope that you can help me.

    • This reply was modified 3 months, 3 weeks ago by  csotomon.
    Sean
    Sean
    Keymaster

    Posts: 4380
    Support Staff Reply #13700

    Hi

    This forum is for the old Metronic v4.x versions. The old v4.x uses datatables.net plugin.

    Also please provide us following info:

    1) Are you using Metronic v4.x or the next v5.x ?

    2) Is your datasource local json or remote json via ajax ?

    3) Do you want to make the search local or remote ?

    4) If you are using Metronic v5.0 then you should first initialize the datatable in Angular following the documentation: http://keenthemes.com/metronic/documentation.html  Only after that you can perform the search.

    Thanks.

     


    csotomon
    Participant

    Posts: 9
    Member Reply #13787

    1) we are using v5 from themeforest

    2) local data

    3) local

    4) yes, the datatables is initialized, but i can’t found how to make a search in a specific field using wildcards  or all the records that start with a text in an input.

     

    Can you move this post to the V5 forum?

    • This reply was modified 3 months, 2 weeks ago by  csotomon.
    • This reply was modified 3 months, 2 weeks ago by  csotomon.
    Jai
    Jai
    Keymaster

    Posts: 1786
    Support Staff Reply #13862

    Hi 🙂

    To use search for the specific column, you can check our example to filter by a column.

    /theme/default/src/js/demo/default/custom/components/datatables/base/data-ajax.js

    Example like below:

    datatable.search(‘keyword’, ‘ColumnName’);

    Thanks

Tagged: 

You must be logged in to reply to this topic.