diff --git a/RELEASE.md b/RELEASE.md index 0a06a9097..5d8bc3d4b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,13 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- Aggiunta la possibilità di inserire testo nel filtro luogo nel blocco Ricerca Eventi +- Le opzioni del menu a tendina per il filtro luogo nel blocco Ricerca Eventi sono ordinate alfabeticamente + ## Versione 11.9.1 (03/04/2024) ### Fix diff --git a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx index c34deec02..474335694 100644 --- a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx +++ b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx @@ -4,7 +4,14 @@ import { SelectInput } from 'design-comuni-plone-theme/components'; import { useDispatch, useSelector } from 'react-redux'; import { searchContent, getVocabulary } from '@plone/volto/actions'; -const SelectFilter = ({ options, value, id, onChange, placeholder }) => { +const SelectFilter = ({ + options, + value, + id, + onChange, + placeholder, + isSearchable = false, +}) => { const dispatch = useDispatch(); const state = useSelector((state) => { @@ -64,6 +71,7 @@ const SelectFilter = ({ options, value, id, onChange, placeholder }) => { }} options={select_options?.filter((opt) => !!opt.value?.toString()) ?? []} isClearable={true} + isSearchable={isSearchable} // components={{ // ClearIndicator: (props) => { // const { diff --git a/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js b/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js index 75162dce8..6ecdf1179 100644 --- a/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +++ b/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js @@ -65,6 +65,7 @@ const DefaultFilters = () => { component: SelectFilter, props: { value: null, + isSearchable: true, options: { dispatch: { path: subsite ? flattenToAppURL(subsite['@id']) : '/', @@ -72,6 +73,10 @@ const DefaultFilters = () => { fullobjects: 0, b_size: 10000, subrequests_name: 'venues', + additionalParams: { + sort_on: 'sortable_title', + sort_order: 'ascending', + }, }, placeholder: intl.formatMessage(messages.venues), }, diff --git a/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss b/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss index f25e64b45..1e544c53e 100644 --- a/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss +++ b/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss @@ -110,6 +110,18 @@ } } + .bg-primary { + .search-container { + .filter-wrapper { + &.select-filter { + .react-select__input { + color: color-contrast($primary); + } + } + } + } + } + .bg-secondary { .search-container { .filter-wrapper { @@ -140,6 +152,10 @@ .react-select__single-value { color: $secondary-text !important; } + + .react-select__input { + color: color-contrast($secondary); + } } &.date-filter .DateRangePickerInput {