Toggle Filter only used when On?

I have a table filter like so
Filter::make('criteria_id')
    ->label('Has Criteria')
    ->query(fn (Builder $query): Builder => $query->whereHas('criteria'))
    ->toggle(),
. i only want it applied when its toggled on and it do nothing when its off. How can i do that?
Was this page helpful?