From 2ad9c441246f65680edbbf0cc524f53b383d355a Mon Sep 17 00:00:00 2001 From: "Somayeh.Ghanavati" Date: Fri, 24 Jul 2026 18:51:00 +0330 Subject: [PATCH] refactor: remove slice and add scroll --- src/cmdkTestDemo.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/cmdkTestDemo.tsx b/src/cmdkTestDemo.tsx index bcb57ed..fce3b71 100644 --- a/src/cmdkTestDemo.tsx +++ b/src/cmdkTestDemo.tsx @@ -9,6 +9,7 @@ interface Product { category: string; brand: string; } + function generate5kMockProducts(): Product[] { const categories = [ "Electronics", @@ -57,12 +58,19 @@ export default function CmdkTestDemo() { onOpenChange={() => setOpened(false)} label="Global Command Menu" > - - - + + No results found. - {actions.slice(0, 50).map((action) => ( + {actions.map((action) => (