This is an automated email from the ASF dual-hosted git repository.

kgabryje pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7f72c747f5b fix(dataset-modal): prevent shift-select from selecting 
search-hidden items (#38255)
7f72c747f5b is described below

commit 7f72c747f5be4cff886651c157640f18a9746ed3
Author: Kamil Gabryjelski <[email protected]>
AuthorDate: Thu Feb 26 15:07:02 2026 +0100

    fix(dataset-modal): prevent shift-select from selecting search-hidden items 
(#38255)
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
---
 superset-frontend/src/components/Datasource/FoldersEditor/index.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/superset-frontend/src/components/Datasource/FoldersEditor/index.tsx 
b/superset-frontend/src/components/Datasource/FoldersEditor/index.tsx
index 7325569c50c..18b5ea358b8 100644
--- a/superset-frontend/src/components/Datasource/FoldersEditor/index.tsx
+++ b/superset-frontend/src/components/Datasource/FoldersEditor/index.tsx
@@ -250,7 +250,9 @@ export default function FoldersEditor({
         // Range selection when shift is held and we have a previous selection
         if (shiftKey && selected && lastSelectedId) {
           const selectableItems = flattenedItems.filter(
-            item => item.type !== FoldersEditorItemType.Folder,
+            item =>
+              item.type !== FoldersEditorItemType.Folder &&
+              visibleItemIds.has(item.uuid),
           );
 
           const currentIndex = selectableItems.findIndex(
@@ -277,7 +279,7 @@ export default function FoldersEditor({
         return newSet;
       });
     },
-    [flattenedItems],
+    [flattenedItems, visibleItemIds],
   );
 
   const handleStartEdit = useCallback((folderId: string) => {

Reply via email to