Filtering is not that easy to implement as editing and sorting and it almost always requires custom logic.
That’s the reason that there is not a default implementation for this in the toolkit.
Currently, there are two ways to filter column in our plugin.
1) Filtering with the drop down options on the table screen
2) The new Smart Filtering feature (https://www.admincolumns.com/smart-filtering-wordpress-content/)
Both solutions require a method in the column class that tells which model must be loaded.
Let’s take a numeric custom field and implement that already present model for that field.
For filtering it looks like
public function filtering() {
return new ACP\Filtering\Model\CustomField\Numeric( $this );
}
for smart filtering it’s easier and it looks like:
public function search() {
return new ACP\Search\Comparison\Meta\Numeric( $this->get_meta_key(), $this->get_meta_type() );
}
For the actual logic of the models and comparison you’ll need to have a look at the many examples in our code.