After having a filter applied, filter value is not cleared when FilterOption was set to "NoFilter".
The following client-side logic would clear the textbox values before the filtering is applied if filter options are set to "NoFilter"
function onCommand(sender, args) {
if (args.get_commandName() == "HeaderContextMenuFilter") {
var firstTextBox = $("[id$='HCFMRTBFirstCond']")[0].control;
var firstFilterOption = args.get_commandArgument().split("|")[1];
var secondTextBox = $("[id$='HCFMRTBSecondCond']")[0].control;
var secondFilterOption = args.get_commandArgument().split("|")[3];
if (firstFilterOption.includes("NoFilter") && firstTextBox.get_value() != "") {
args.set_cancel(true);
var value = firstTextBox.get_value();
firstTextBox.clear();
var newArg = args.get_commandArgument().replace("|" + value + "|?", "||?");
args.get_tableView().fireCommand(args.get_commandName(), newArg);
}
if (secondFilterOption.includes("NoFilter") && secondTextBox.get_value() != "") {
args.set_cancel(true);
var value = firstTextBox.get_value();
secondTextBox.clear();
var newArg = args.get_commandArgument().replace("|" + value + "|?", "||?");
args.get_tableView().fireCommand(args.get_commandName(), newArg);
}
}
}