Skip to content

Commit

Permalink
fix: fixed event search results
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraBianchi committed Jan 15, 2025
1 parent 7f05bdb commit b9bd616
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -30,6 +30,12 @@
- ...
-->

## Versione X.X.X (dd/mm/yyyy)

### Fix
- Sistemato un bug che non restituiva i risultati di ricerca nel blocco di Ricerca Eventi anche se il flag "Di default, mostra i risultati" era attivo. Risolto problema che mandava in errore il blocco alla creazione di esso.


## Versione 7.33.2 (09/12/2024)

### Fix
9 changes: 1 addition & 8 deletions src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx
Original file line number Diff line number Diff line change
@@ -64,13 +64,6 @@ const Body = ({ data, id, inEditMode, path, onChangeBlock }) => {
);
});

const firstLoading = useSelector((state) => {
return (
!state.querystringsearch?.subrequests?.[id + '_events_search']?.loading &&
!state.querystringsearch?.subrequests?.[id + '_events_search']?.loaded
);
});

const resultsRef = createRef();

const doRequest = (page = currentPage) => {
@@ -116,7 +109,7 @@ const Body = ({ data, id, inEditMode, path, onChangeBlock }) => {
// Se cambia uno dei tre filtri resetto lo stato dei filtri
useEffect(() => {
dispatchFilter({ type: 'reset' });
if (data.show_default_results && firstLoading) {
if (data.show_default_results) {
doRequest();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import DefaultFilters from 'design-comuni-plone-theme/components/ItaliaTheme/Blo
componente da customizzare nel proprio sito per modificare/aggiungere tipologie di Filtri
***
*/
const FiltersConfig = ({ data }) => {
const FiltersConfig = (props) => {
// const subsite = useSelector((state) => state.subsite?.data);
const defaultFilters = DefaultFilters();

0 comments on commit b9bd616

Please sign in to comment.