diff --git a/geonode_mapstore_client/client/js/components/FiltersForm/FilterItems.jsx b/geonode_mapstore_client/client/js/components/FiltersForm/FilterItems.jsx index 9064b60422..5bb263d84a 100644 --- a/geonode_mapstore_client/client/js/components/FiltersForm/FilterItems.jsx +++ b/geonode_mapstore_client/client/js/components/FiltersForm/FilterItems.jsx @@ -100,6 +100,7 @@ function FilterItems({ const active = customFilters.find(value => value === item.id); return ( - {!!active && filterChild()} + {filterChild()} ); diff --git a/geonode_mapstore_client/client/js/components/FiltersMenu/FiltersMenu.jsx b/geonode_mapstore_client/client/js/components/FiltersMenu/FiltersMenu.jsx index f17aed7adb..406430d99a 100644 --- a/geonode_mapstore_client/client/js/components/FiltersMenu/FiltersMenu.jsx +++ b/geonode_mapstore_client/client/js/components/FiltersMenu/FiltersMenu.jsx @@ -11,6 +11,7 @@ import Dropdown from '@js/components/Dropdown'; import Button from '@js/components/Button'; import Badge from '@js/components/Badge'; import Message from '@mapstore/framework/components/I18N/Message'; +import { getConfigProp } from '@mapstore/framework/utils/ConfigUtils'; import FaIcon from '@js/components/FaIcon'; import useLocalStorage from '@js/hooks/useLocalStorage'; import Menu from '@js/components/Menu'; @@ -31,11 +32,13 @@ const FiltersMenu = forwardRef(({ loading }, ref) => { + const { isMobile } = getConfigProp('geoNodeSettings'); const selectedSort = orderOptions.find(({ value }) => order === value); const [cardLayoutStyle, setCardLayoutStyle] = useLocalStorage('layoutCardsStyle', 'grid'); function handleToggleCardLayoutStyle() { setCardLayoutStyle(cardLayoutStyle === 'grid' ? 'list' : 'grid'); } + return (
- + {isMobile ? : 'Filter'} {' '} diff --git a/geonode_mapstore_client/client/themes/geonode/less/_filter-form.less b/geonode_mapstore_client/client/themes/geonode/less/_filter-form.less index 0ef3a8349e..a08f96e246 100644 --- a/geonode_mapstore_client/client/themes/geonode/less/_filter-form.less +++ b/geonode_mapstore_client/client/themes/geonode/less/_filter-form.less @@ -106,3 +106,14 @@ } } } + +.gn-sub-filter-items.checkbox { + + &:first-of-type { + margin-top: 5px; + } + + &:last-child { + margin-bottom: 0; + } +} \ No newline at end of file