From 828bba61de9adc06c7f26dad58d77e8b45e9ef1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 3 Mar 2026 22:39:29 +0100 Subject: [PATCH] combobox fix --- client/components/combobox.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/components/combobox.jsx b/client/components/combobox.jsx index 5060b8ecf..4d850b00d 100644 --- a/client/components/combobox.jsx +++ b/client/components/combobox.jsx @@ -21,6 +21,7 @@ const Combobox = createReactClass({ }; }, getInitialState : function() { + this.dropdownRef = React.createRef(); return { showDropdown : false, value : '', @@ -41,7 +42,7 @@ const Combobox = createReactClass({ }, handleClickOutside : function(e){ // Close dropdown when clicked outside - if(this.refs.dropdown && !this.refs.dropdown.contains(e.target)) { + if (this.dropdownRef.current && !this.dropdownRef.current.contains(e.target)) { this.handleDropdown(false); } }, @@ -128,7 +129,7 @@ const Combobox = createReactClass({ }); return (
{this.handleDropdown(false);} : undefined}> {this.renderTextInput()} {this.renderDropdown(dropdownChildren)}