@@ -127,12 +127,21 @@ const SearchView = () => {
127
127
< div className = "search-view" >
128
128
< div className = "search-view__bar" >
129
129
< div className = "search-view__category-select" >
130
- < FormControl classes = { { root : customCss . categoryBorder } } sx = { { width : '150px ' } } >
130
+ < FormControl classes = { { root : customCss . categoryBorder } } style = { { height : '100% ' } } >
131
131
< Select
132
132
value = { searchCategory }
133
133
onChange = { handleCategoryChange }
134
134
displayEmpty
135
- inputProps = { { sx : { textAlign : 'center' } } }
135
+ style = { {
136
+ height : '100%' ,
137
+ width : '100%' ,
138
+ minWidth : '150px' ,
139
+ } }
140
+ inputProps = { {
141
+ sx : {
142
+ textAlign : 'center' ,
143
+ } ,
144
+ } }
136
145
>
137
146
< MenuItem value = "patientId" > Patient ID</ MenuItem >
138
147
< MenuItem value = "projectName" > Project Name</ MenuItem >
@@ -146,19 +155,26 @@ const SearchView = () => {
146
155
< TextField
147
156
InputLabelProps = { { shrink : true } }
148
157
variant = "outlined"
149
- helperText = { thresholdErrorMessage }
150
158
error = { Boolean ( thresholdErrorMessage ) }
151
159
onChange = { handleThresholdChange }
152
160
value = { searchThreshold }
153
161
defaultValue = { DEFAULT_THRESHOLD }
154
162
placeholder = "0.8"
155
163
onKeyDown = { handleKeyDown }
156
- inputProps = { { sx : { textAlign : 'center' } } }
164
+ inputProps = { {
165
+ sx : {
166
+ textAlign : 'center' ,
167
+ height : 'inherit' ,
168
+ width : '100%' ,
169
+ } ,
170
+ } }
157
171
// eslint-disable-next-line react/jsx-no-duplicate-props
158
172
InputProps = { {
159
173
type : 'number' ,
160
174
sx : {
161
175
borderRadius : '0px' ,
176
+ height : '100%' ,
177
+ minWidth : '100px' ,
162
178
} ,
163
179
} }
164
180
/>
@@ -167,7 +183,6 @@ const SearchView = () => {
167
183
< Autocomplete
168
184
multiple
169
185
options = { [ ] }
170
- defaultValue = { [ ] }
171
186
freeSolo
172
187
value = { searchKey }
173
188
disableClearable
@@ -178,6 +193,8 @@ const SearchView = () => {
178
193
borderTopRightRadius : '25px' ,
179
194
borderBottomRightRadius : '25px' ,
180
195
} ,
196
+ height : 'inherit' ,
197
+ width : '100%' ,
181
198
} }
182
199
limitTags = { 4 }
183
200
renderTags = { ( value ) => value . map ( ( { category, keyword, threshold } : SearchKeyType , index : number ) => (
@@ -195,10 +212,9 @@ const SearchView = () => {
195
212
name = "keyword"
196
213
variant = "outlined"
197
214
error = { Boolean ( searchErrorMessage ) }
198
- helperText = { searchErrorMessage }
199
215
onChange = { handleKeywordChange }
200
216
onKeyDown = { handleKeyDown }
201
- placeholder = { searchKey . length < 1 ? 'Press enter to add search key . Press backspace to delete.' : '' }
217
+ placeholder = { searchKey . length < 1 ? 'Press enter to add search keyword . Press backspace to delete.' : '' }
202
218
InputProps = { {
203
219
...params . InputProps ,
204
220
endAdornment : (
@@ -231,10 +247,20 @@ const SearchView = () => {
231
247
/>
232
248
</ div >
233
249
</ div >
250
+ < div className = "error-dialog" >
251
+ < Typography variant = "subtitle2" color = "error" >
252
+ { searchErrorMessage }
253
+ </ Typography >
254
+ </ div >
255
+ < div className = "error-dialog" >
256
+ < Typography variant = "subtitle2" color = "error" >
257
+ { thresholdErrorMessage }
258
+ </ Typography >
259
+ </ div >
234
260
< div className = "help-dialog" >
235
261
< Typography variant = "subtitle2" color = "primary" >
236
- The matching threshold determines the cutoff of similarity between the search key and its matches .
237
- A value of 1 means exact matches or exact substring matches . The default value is 0.8 if not specified.
262
+ The matching threshold scales from 0 to 1 and determines the cutoff of similarity between the search keyword and a match value .
263
+ A threshold of 1 means the entire match value or a substring of it is identical to the search keyword . The default value is 0.8 if not specified.
238
264
</ Typography >
239
265
</ div >
240
266
</ div >
0 commit comments