From 749f896616cdf796cbf28310b69e3fd8a3c0e92d Mon Sep 17 00:00:00 2001 From: Batuhan Tomo <91488737+Rekl0w@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:15:20 +0300 Subject: [PATCH] Fix #6749: Fix TreeSelect filter for space key (#6754) * Fix #6749: Fix TreeSelect filter for space key * Fix #6749: format --- components/lib/treeselect/TreeSelect.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/components/lib/treeselect/TreeSelect.js b/components/lib/treeselect/TreeSelect.js index e8aa259892..ae9aadb40c 100644 --- a/components/lib/treeselect/TreeSelect.js +++ b/components/lib/treeselect/TreeSelect.js @@ -208,7 +208,6 @@ export const TreeSelect = React.memo( break; - case 'Space': case 'Enter': case 'NumpadEnter': event.preventDefault(); @@ -856,7 +855,15 @@ export const TreeSelect = React.memo( const rootProps = mergeProps( { ref: elementRef, - className: classNames(props.className, cx('root', { context, focusedState, overlayVisibleState, isValueEmpty })), + className: classNames( + props.className, + cx('root', { + context, + focusedState, + overlayVisibleState, + isValueEmpty + }) + ), style: props.style, onClick: onClick },