Browse Source

remove session when filter empty

feature/symfony6.1
Charly 3 years ago
parent
commit
8861bd9370
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      Field/Filter/FilterManager.php

+ 4
- 0
Field/Filter/FilterManager.php View File

@@ -160,6 +160,10 @@ class FilterManager
$this->session->set($sessionParam, $value);
return $value;
}
// pas de valeur et le form est envoyé, on supprimer le filtre correspondant
elseif($formField->isSubmitted()) {
$this->session->remove($sessionParam);
}

//action reset
if ($filtersForm->get('reset')->getData() == 'clearAll') {

Loading…
Cancel
Save