Skip to content

Commit 590e5a5

Browse files
Merge pull request #65 from tutorcruncher/dependabot/npm_and_yarn/react-select-3.0.4
Bump react-select from 1.2.1 to 3.0.4
2 parents fb353af + 125e7e5 commit 590e5a5

File tree

5 files changed

+1633
-1562
lines changed

5 files changed

+1633
-1562
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"react-dom": "^16.12.0",
4848
"react-router-dom": "^5.1.2",
4949
"react-scripts": "1.1.5",
50-
"react-select": "~1.2.1",
50+
"react-select": "^3.0.8",
5151
"react-tooltip": "^3.11.1",
5252
"sass-loader": "^7.3.1",
5353
"shelljs": "0.8.3",

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
router_mode: 'history',
8080
mode: 'enquiry-modal',
8181
api_root: api_root,
82-
modal_parent: 'footer',
82+
modal_container: 'footer',
8383
})
8484
</script>
8585
</html>

src/components/contractors/Filters.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ export const SubjectSelect = ({get_text, show, subjects, selected_subject, subje
77
<div className="tcs-contractor-filter">
88
<If v={show}>
99
<Select
10-
value={selected_subject && selected_subject.id}
10+
value={selected_subject}
1111
onChange={subject_change}
1212
placeholder={get_text('subject_filter_placeholder')}
13-
labelKey='name'
14-
valueKey='id'
13+
classNamePrefix='multiselect'
14+
getOptionLabel={({name}) => name}
15+
getOptionValue={({id}) => id}
16+
isClearable={true}
1517
options={subjects}/>
1618
</If>
1719
</div>

src/styles/contractors.scss

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,13 @@ $pagination-radius: 4px;
149149
}
150150
}
151151

152-
@import '~react-select/dist/react-select.min';
153-
154152
.multiselect__select {
155153
cursor: default;
156154
right: 16px;
157155
}
158156

159-
.multiselect__option--highlight {
160-
background: $brand-colour;
161-
}
162-
163-
.multiselect__option--selected.multiselect__option--highlight {
164-
background: darken($brand-colour, 10%);
157+
.multiselect__option--is-selected {
158+
background: $brand-colour !important;
165159
}
166160

167161
.tcs-filters-container {
@@ -181,15 +175,17 @@ $pagination-radius: 4px;
181175
margin-left: 4px;
182176
}
183177

184-
.tcs-location-filter {
178+
.tcs-location-filter, .multiselect__control {
185179
margin-right: 4px;
186180
border-radius: 4px;
187-
border: 1px solid $dft-border-color;
188-
height: 36px;
181+
border: 1px solid $dft-border-color !important;
182+
height: 36px !important;
183+
min-height: 36px !important;
189184
padding: 0 2px;
190185
background: white;
191186
}
192187

188+
193189
.tcs-location-input {
194190
width: calc(100% - 50px);
195191
border: none;
@@ -201,6 +197,7 @@ $pagination-radius: 4px;
201197
color: #aaa;
202198
}
203199
}
200+
204201
.tcs-location-clear {
205202
padding: 6px;
206203
width: 30px;

0 commit comments

Comments
 (0)