Open viper4gh opened 6 years ago
The following commands could help:
jQuery("#DriverDataTable").setGridParam({ postData: { filters: {}} }).trigger("reloadGrid");
jQuery("#DriverDataTable")[0].clearToolbar();
The first clears the filter for the data and the second clears the input fields in the filter toolbar
if you use it, then the indicator for the number of filtered elements ist not working, because ist is only updated AfterSearch: https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L825
If you enable a filter on a column which will be hidden after a Session change then you cannot clear it. For example you set a pits=1 filter during race of a demo file. After the playback begins again and there is a qualification the driver table is empty, because never has pit stop and you cannot clear the filter, because the column is hidden.
A new button "Clear all filter" could help, if this is available in jqgrid. Or automatically clear all filters on a session change.