From 4401d94be1f93e192f89c433efb53ba3b1840fc4 Mon Sep 17 00:00:00 2001 From: Priya Bihani Date: Tue, 20 Apr 2021 09:46:25 +0530 Subject: [PATCH] fix: Select option don't toggle on clicking the close icon (#417) Co-authored-by: Tiago Evangelista Pinto --- packages/fuselage/src/components/Select/Select.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/fuselage/src/components/Select/Select.js b/packages/fuselage/src/components/Select/Select.js index 12544bdbeb..39b2e1fd3b 100644 --- a/packages/fuselage/src/components/Select/Select.js +++ b/packages/fuselage/src/components/Select/Select.js @@ -118,7 +118,11 @@ export const Select = ({ rcx-select disabled={disabled} ref={containerRef} - onClick={useMutableCallback(() => ref.current.focus() & show())} + onClick={useMutableCallback(() => + visible === AnimatedVisibility.VISIBLE + ? hide() + : ref.current.focus() & show() + )} className={useMemo(() => [error && 'invalid', disabled && 'disabled'], [ error, disabled,