feat: add showScrollbar prop to VirtualGrid (#7227)

## Summary

Enable vertical scrollbar in Media Assets sidebar for better navigation
when content overflows.

The original implementation hid the scrollbar by default. 
Since the intent behind hiding it wasn't documented, this change
preserves the default behavior (showScrollbar: false) while allowing
components to opt-in to visible scrollbars when needed.

fix https://github.com/Comfy-Org/ComfyUI_frontend/issues/6914

## Screenshots (if applicable)
<img width="681" height="890" alt="image"
src="https://github.com/user-attachments/assets/af48a440-6d04-4226-9482-eb17f8d11a40"
/>

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7227-feat-add-showScrollbar-prop-to-VirtualGrid-2c36d73d365081c8955ee632c6c644f7)
by [Unito](https://www.unito.io)
This commit is contained in:
Terry Jia
2025-12-08 21:31:16 -05:00
committed by GitHub
parent 4a3098f1f2
commit f385ee8ca2

View File

@@ -117,16 +117,7 @@ onBeforeUnmount(() => {
.scroll-container {
height: 100%;
overflow-y: auto;
/* Firefox */
scrollbar-width: none;
&::-webkit-scrollbar {
width: 1px;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
}
scrollbar-width: thin;
scrollbar-color: var(--dialog-surface) transparent;
}
</style>