From 2b2b91f904f07b78ccd0598e0cc8e49e972a6ff6 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 17:35:54 -0300 Subject: [PATCH] fix: virtualization examples --- .../virtualization-ten-thousand.raw.jsx | 39 ++++++++++++------- .../components/listbox/virtualization.raw.jsx | 39 ++++++++++++------- .../virtualization-custom-item-height.raw.jsx | 1 + .../virtualization-max-listbox-height.raw.jsx | 1 + .../virtualization-ten-thousand.raw.jsx | 7 +++- .../components/select/virtualization.raw.jsx | 7 +++- 6 files changed, 62 insertions(+), 32 deletions(-) diff --git a/apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx b/apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx index f569bea6cc..51bc830984 100644 --- a/apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx +++ b/apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx @@ -32,26 +32,35 @@ const generateItems = (n) => { return dataset; }; +const ListboxWrapper = ({children}) => ( +
+ {children} +
+); + export default function App() { const items = generateItems(1000); return (
- - {items.map((item, index) => ( - - {item.label} - - ))} - + + + {items.map((item, index) => ( + + {item.label} + + ))} + +
); } diff --git a/apps/docs/content/components/listbox/virtualization.raw.jsx b/apps/docs/content/components/listbox/virtualization.raw.jsx index 96ec2011b8..34aa80ade1 100644 --- a/apps/docs/content/components/listbox/virtualization.raw.jsx +++ b/apps/docs/content/components/listbox/virtualization.raw.jsx @@ -31,26 +31,35 @@ const generateItems = (n) => { return dataset; }; +const ListboxWrapper = ({children}) => ( +
+ {children} +
+); + export default function App() { const items = generateItems(1000); return (
- - {items.map((item, index) => ( - - {item.label} - - ))} - + + + {items.map((item, index) => ( + + {item.label} + + ))} + +
); } diff --git a/apps/docs/content/components/select/virtualization-custom-item-height.raw.jsx b/apps/docs/content/components/select/virtualization-custom-item-height.raw.jsx index 35c578ffb1..efc2db30c2 100644 --- a/apps/docs/content/components/select/virtualization-custom-item-height.raw.jsx +++ b/apps/docs/content/components/select/virtualization-custom-item-height.raw.jsx @@ -39,6 +39,7 @@ export default function App() {
- {items.map((item, index) => ( {item.label} diff --git a/apps/docs/content/components/select/virtualization.raw.jsx b/apps/docs/content/components/select/virtualization.raw.jsx index 8434e57521..5701198948 100644 --- a/apps/docs/content/components/select/virtualization.raw.jsx +++ b/apps/docs/content/components/select/virtualization.raw.jsx @@ -37,7 +37,12 @@ export default function App() { return (
- {items.map((item, index) => ( {item.label}