Pass string to table's search with javascript?

Is there a way to pass a string to a table’s search bar when the table renders?

^^

There really is not a supported way to do this now.  The searchbox has a class, which can be found from the component, and be manipulated using jQuery.  So theoretically you could add text to the class.   Getting the search to atcually be effective would be an entirely different problem…

You can pre-fill filter values by adding parameters to your URL string.  This may work for you.  If you have a condition named “type” append  “&type=foo” to your URL and the page will be filtered to foo. 



I know this is an old one, but I had to do this recently and used jQuery’s .change() method on the searchbox to force the table to process the search. For example:

// Insert value into search box $(".searchbox").val("Value to put into search box"); // Cause searchbox to update and run search on table $(".searchbox").change();