Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed query b_size limit for event_location vocabulary #843

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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,
pnicolli marked this conversation as resolved.
Show resolved Hide resolved
}),
);
}
}, []);

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
Loading