Skip to content

Commit

Permalink
PM-4128 Fix react-select issue when deselecting
Browse files Browse the repository at this point in the history
  • Loading branch information
duchenean committed Oct 13, 2023
1 parent dd04b35 commit 967303e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_stages: [ commit, push ]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-ast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ const InstitutionsSelect = (props) => {
* handle click of the institution.
* Set selected state so <a> link can be used to navigate to the institution.
*/
const handleChange = (option) => {
setSelected(institutions[option.value]);
const handleChange = (option, changeType) => {
if (option) {
setSelected(institutions[option.value]);
} else {
setSelected({});
}
};

return (
Expand All @@ -78,6 +82,7 @@ const InstitutionsSelect = (props) => {
onChange={handleChange}
placeholder={"Sélectionner"}
noOptionsMessage={() => <span>Aucun résulat</span>}
isClearable
autoBlur
/>
)}
Expand Down
21 changes: 10 additions & 11 deletions versions.cfg
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
[versions]

# Added by buildout at 2023-09-18 09:59:50.028284
# Added by buildout at 2023-10-13 14:39:31.154643
collective.cookiecuttr = 2.0.0
createcoverage = 1.5
imio.pyutils = 0.30
imio.pyutils = 0.31
ipdb = 0.13.13
iw.debug = 0.3
jedi = 0.19.0
jedi = 0.19.1
mockito = 1.4.0
natsort = 6.2.1
parso = 0.8.3
pexpect = 4.8.0
plone.app.jquery = 1.11.2
plone.formwidget.hcaptcha = 1.0.2
ptyprocess = 0.7.0
robotframework-debuglibrary = 2.3.0
traitlets = 5.10.0
traitlets = 5.11.2

# Required by:
# ipython==7.34.0
backcall = 0.2.0

# Required by:
# plonemeeting.portal.core==1.6.2.dev0
# plonemeeting.portal.core==1.6.3.dev0
collective.dexteritytextindexer = 2.4.1

# Required by:
# imio.helpers==0.76.dev0
# plonemeeting.portal.core==1.6.2.dev0
# imio.helpers==0.77.dev0
# plonemeeting.portal.core==1.6.3.dev0
collective.fingerpointing = 1.8.3

# Required by:
# plonemeeting.portal.core==1.6.2.dev0
# plonemeeting.portal.core==1.6.3.dev0
collective.pwexpiry = 0.15.1

# Required by:
# plonemeeting.portal.core==1.6.2.dev0
eea.facetednavigation = 15.1
# plonemeeting.portal.core==1.6.3.dev0
eea.facetednavigation = 16.0

# Required by:
# collective.fingerpointing==1.8.3
Expand Down

0 comments on commit 967303e

Please sign in to comment.