Skip to content

Commit

Permalink
fix: Select option don't toggle on clicking the close icon (#417)
Browse files Browse the repository at this point in the history
Co-authored-by: Tiago Evangelista Pinto <tiago.evangelista@rocket.chat>
  • Loading branch information
PriyaBihani and tiagoevanp authored Apr 20, 2021
1 parent 1e4b30b commit 4401d94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/fuselage/src/components/Select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4401d94

Please sign in to comment.