@@ -5,10 +5,7 @@ import Heading from "../heading/Heading";
5
5
import ContentPanel from "../contentPanel/ContentPanel" ;
6
6
import SelectBox from "../../common/selectBox/SelectBox" ;
7
7
import SearchBox from "./searchBox/SearchBox" ;
8
- import StandardButton from "../../common/standardButton/StandardButton" ;
9
8
import Typography from "@mui/material/Typography" ;
10
- import Box from "@mui/material/Box" ;
11
- import { styled } from "@mui/material/styles" ;
12
9
import useMediaQuery from "@mui/material/useMediaQuery" ;
13
10
import { useAppDispatch , useAppSelector } from "../../../app/hooks" ;
14
11
import {
@@ -23,20 +20,6 @@ import {
23
20
import { selectTotalItemsCount } from "../../map/mapSlice" ;
24
21
import { openResultsPanel } from "../panelSlice" ;
25
22
26
- const StyledButtonContainer = styled ( Box ) ( ( ) => ( {
27
- width : "100%" ,
28
- display : "flex" ,
29
- justifyContent : "center" ,
30
- position : "sticky" ,
31
- padding : "var(--spacing-medium)" ,
32
- backgroundColor : "rgba(255, 255, 255, 0.25) !important" ,
33
- boxShadow : "0 0 20px rgba(0, 0, 0, 0.16)" ,
34
- zIndex : 1 ,
35
- "@media (min-width: 897px)" : {
36
- display : "none" ,
37
- } ,
38
- } ) ) ;
39
-
40
23
const SearchPanel = ( ) => {
41
24
const dispatch = useAppDispatch ( ) ;
42
25
const { t } = useTranslation ( ) ;
@@ -53,6 +36,7 @@ const SearchPanel = () => {
53
36
54
37
const onSearchChange = ( e : React . FormEvent < HTMLInputElement > ) : void => {
55
38
setCurrentText ( e . currentTarget . value ) ;
39
+ dispatch ( setText ( currentText ) ) ;
56
40
} ;
57
41
58
42
const onFilterChange = async (
@@ -65,12 +49,6 @@ const SearchPanel = () => {
65
49
if ( isMedium ) dispatch ( openResultsPanel ( ) ) ;
66
50
} ;
67
51
68
- const onApplyFilters = async ( ) => {
69
- console . log ( `Applying filters` ) ;
70
- await dispatch ( performSearch ( ) ) ;
71
- dispatch ( openResultsPanel ( ) ) ;
72
- } ;
73
-
74
52
const onSubmitSearch = async ( ) => {
75
53
console . log ( `Searching for '${ submittedText } '` ) ;
76
54
dispatch ( setText ( currentText ) ) ;
@@ -87,7 +65,12 @@ const SearchPanel = () => {
87
65
88
66
return (
89
67
< form
90
- style = { { display : "flex" , flexDirection : "column" , overflow : "hidden" } } // Fix for search filter overflow issue
68
+ style = { {
69
+ display : "flex" ,
70
+ flexDirection : "column" ,
71
+ overflow : "hidden" ,
72
+ paddingBottom : "80px" ,
73
+ } } // Fix for search filter overflow issue
91
74
>
92
75
< Heading title = { t ( "search" ) } >
93
76
< SearchBox
@@ -113,16 +96,6 @@ const SearchPanel = () => {
113
96
/>
114
97
) ) }
115
98
</ ContentPanel >
116
- < StyledButtonContainer >
117
- { ! isMedium && (
118
- < StandardButton
119
- buttonAction = { onApplyFilters }
120
- disabled = { ! currentText && ! isFilterActive }
121
- >
122
- { t ( "apply_filters" ) }
123
- </ StandardButton >
124
- ) }
125
- </ StyledButtonContainer >
126
99
</ form >
127
100
) ;
128
101
} ;
0 commit comments