vedmack / yadcf

Yet Another DataTables Column Filter (yadcf)
http://yadcf-showcase.appspot.com/
MIT License
732 stars 285 forks source link

How to edit no results hints? #657

Closed chanben2005 closed 2 years ago

chanben2005 commented 2 years ago

Hi How to edit the No matches found hints? image Any help would be appreciated.

vedmack commented 2 years ago

Please provide a jsfiddle test page with your example

chanben2005 commented 2 years ago

image

http://live.datatables.net/yiliqepi/2/edit

for example, I want to modify the No results found to No results.

Thank you!

vedmack commented 2 years ago

Take a look at this http://live.datatables.net/yiliqepi/3/edit

I recommend you to go over yadcf docs...

Complete code:

// DataTable
$(document).ready(function(){
  let myOptions = {"language": {
       "noResults": function(){
           return "Hi there... Please be kind and use some other key word";
       }
  }}
  $('#item').dataTable().yadcf([
    {column_number : 0,filter_type: "multi_select", select_type: 'select2', select_type_options: myOptions},
        {column_number : 1,  filter_type: "range_number_slider", filter_container_id: "external_filter_container"},
        {column_number : 2, data: ["Yes", "No"], filter_default_label: "Select Yes/No"},
        {column_number : 3, text_data_delimiter: ",", filter_type: "auto_complete"},
        {column_number : 4, column_data_type: "html", html_data_type: "text", filter_default_label: "Select tag"}]);
});
chanben2005 commented 2 years ago

Thank you for your guidance.

vedmack commented 2 years ago

@chanben2005 all docs are inside the yadcf js file (non minified version)