Skip to content

Commit

Permalink
fix: removed query b_size limit for event_location vocabulary - v3
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-bongiovanni committed Dec 17, 2024
1 parent 2504f8d commit 6441750
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
14 changes: 14 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@
- ...
-->

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

### Migliorie

- ...

### Novità

- ...

### Fix

- Il menu a tendina da cui è possibile filtrare i luoghi nel blocco Ricerca Eventi mostra tutti i luoghi collegati agli eventi presenti nel percorso selezionato dalla Sidebar, senza limitarne il numero.

## Versione 11.25.3 (12/12/2024)

### Migliorie
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const SelectFilter = ({
onChange,
placeholder,
isSearchable = false,
optionsQuerySize = 25,
}) => {
const dispatch = useDispatch();

Expand Down Expand Up @@ -52,15 +53,20 @@ const SelectFilter = ({
);
}
} else if (options.vocabulary) {
dispatch(getVocabulary({ vocabNameOrURL: options.vocabulary }));
dispatch(
getVocabulary({
vocabNameOrURL: options.vocabulary,
size: optionsQuerySize,
}),
);
}
}, []);

const select_options = options?.choices
? options.choices
: options?.vocabulary
? vocabularies?.[options.vocabulary]?.items
: selectOptions;
? vocabularies?.[options.vocabulary]?.items
: selectOptions;

return (
<div className="me-lg-3 my-2 my-lg-1 filter-wrapper select-filter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const DefaultFilters = () => {
vocabulary: 'design.plone.vocabularies.event_location',
placeholder: intl.formatMessage(messages.venues),
},
optionsQuerySize: -1,
},
},
query: (value, query) => {
Expand Down
8 changes: 6 additions & 2 deletions src/customizations/volto/actions/vocabularies/vocabularies.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export function getVocabulary({
const vocabulary = getVocabName(vocabNameOrURL);
const contextualVocabularies = config.settings.contextualVocabularies;
const vocabPath =
contextualVocabularies && contextualVocabularies.includes(vocabulary) && vocabulary !== vocabNameOrURL
contextualVocabularies &&
contextualVocabularies.includes(vocabulary) &&
vocabulary !== vocabNameOrURL
? flattenToAppURL(vocabNameOrURL)
: `/@vocabularies/${vocabulary}`;
let queryString = `b_start=${start}${size ? '&b_size=' + size : ''}`;
Expand Down Expand Up @@ -74,7 +76,9 @@ export function getVocabularyTokenTitle({
const vocabulary = getVocabName(vocabNameOrURL);
const contextualVocabularies = config.settings.contextualVocabularies;
const vocabPath =
contextualVocabularies && contextualVocabularies.includes(vocabulary) && vocabulary !== vocabNameOrURL
contextualVocabularies &&
contextualVocabularies.includes(vocabulary) &&
vocabulary !== vocabNameOrURL
? flattenToAppURL(vocabNameOrURL)
: `/@vocabularies/${vocabulary}`;
const queryString = {
Expand Down

0 comments on commit 6441750

Please sign in to comment.