1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-03 15:13:15 +02:00
7 1.15 No results message
koalyptus edited this page 2016-03-28 19:24:35 +11:00

Message displayed when a search yields no results.

Property Type Description Remarks Example
no_results_message boolean or literal object enables / disables the message appearing when a search has no matches (default - false) You can use this option as a literal object too
var tfConfig = { no_results_message: true };
// or
var tfConfig = { 
  no_results_message: {
    content: 'Data not found'
  } 
};
        
content string Specify the text for the no results message (default - 'No results') It also accepts markup
var tfConfig = { 
  no_results_message: {
    content: '<h3>No results found</h3>'
  } 
};
        
custom_container DOMElement Specify the external DOM element that will contain the no results message (default - null)
var tfConfig = { 
  no_results_message: {
    content: document.querySelector('.my-class')
  } 
};
        
custom_container_id string Specify the ID of the element that will contain the no results message (default - null)
var tfConfig = { 
  no_results_message: {
    content: 'container'
  } 
};
        
css_class string Define the css class for the element that will contain the no results message (default - 'no-results') It also applies to an external custom element
var tfConfig = { 
  no_results_message: {
    css_class: 'my-class'
  } 
};
        
on_before_show_msg function Callback invoked just before a no results message is displayed (default - null)
var tfConfig = { 
  no_results_message: {
    on_before_show_msg: function(tf, feature){
      console.log(feature);  
    }
  } 
};
        
on_after_show_msg function Callback invoked just after a no results message is displayed (default - null)
var tfConfig = { 
  no_results_message: {
    on_after_show_msg: function(tf, feature){
      console.log(feature);  
    }
  } 
};
        
on_before_hide_msg function Callback invoked just before a no results message is closed (default - null)
var tfConfig = { 
  no_results_message: {
    on_before_hide_msg: function(tf, feature){
      console.log(feature);  
    }
  } 
};
        
on_after_hide_msg function Callback invoked just after a no results message is closed (default - null)
var tfConfig = { 
  no_results_message: {
    on_after_hide_msg: function(tf, feature){
      console.log(feature);  
    }
  } 
};