Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ const Body = ({ data, id, inEditMode, path, onChangeBlock }) => {
);
});

const firstLoading = useSelector((state) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perchè hai tolto la variabile firstLoading?

return (
!state.querystringsearch?.subrequests?.[id + '_events_search']?.loading &&
!state.querystringsearch?.subrequests?.[id + '_events_search']?.loaded
);
});

const resultsRef = createRef();

const doRequest = (page = currentPage) => {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

questo non cambia niente, perchè ne props, ne data dentro sono usati, ma va bene così, è piu generico

// const subsite = useSelector((state) => state.subsite?.data);
const defaultFilters = DefaultFilters();

Expand Down
Loading