From 0fbdc0f492b746a61a0f812cc50585d7c38ca4f3 Mon Sep 17 00:00:00 2001 From: MariaAga Date: Wed, 12 Feb 2025 15:54:49 +0000 Subject: [PATCH] Fixes #38209 - vmware Create controller select freezes the page --- .eslintrc | 1 + .../javascripts/react_app/components/common/forms/Select.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 0f541f19ff3..b6f796796cb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -177,6 +177,7 @@ "unordered", "unprocessable", "unselect", + "unselecting", "unstyled", "virtualization", "vms", diff --git a/webpack/assets/javascripts/react_app/components/common/forms/Select.js b/webpack/assets/javascripts/react_app/components/common/forms/Select.js index b161645b22b..56ff95e9633 100644 --- a/webpack/assets/javascripts/react_app/components/common/forms/Select.js +++ b/webpack/assets/javascripts/react_app/components/common/forms/Select.js @@ -25,8 +25,8 @@ class Select extends React.Component { attachEvent() { const { onChange } = this.props; $(this.select) - .off('change', onChange) - .on('change', onChange); + .off('select2:select select2:unselecting', onChange) + .on('select2:select select2:unselecting', onChange); } componentDidMount() {