Set a default filter? #948
-
Sorry if it has been asked, I need to set a dynamic default filter? For example, I want to filter all records to show this month when a month has not been selected manually. I can see how to do this with a public property, but they only work with static values. I'd like to use date and strtotime to set the value for this month. |
Beta Was this translation helpful? Give feedback.
Answered by
tonypartridge
Oct 19, 2022
Replies: 1 comment 2 replies
-
I've solved it with the below public function mount() {
if(!$this->getAppliedFilterWithValue('pay_period')) {
$this->setFilter('pay_period', '2022-10-01');
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
tonypartridge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've solved it with the below