Skip to content

Commit fdce557

Browse files
committed
fix(examples): scroll the composed emoji grid instead of overflowing
The vite example's custom `PagedGrid` used the bare `str-chat__emoji-picker__grid` class, which has no CSS rule of its own (it is only react-virtuoso's className), so its non-virtualized cells overflowed the fixed-height picker body and overlapped the preview footer. Use the SDK's scrollable `str-chat__emoji-picker__grid-container` class (`block-size: 100%` + `overflow-y`), the same one the built-in search-results view uses.
1 parent c46e939 commit fdce557

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

examples/vite/src/AppSettings/tabs/EmojiPicker/EmojiPickerTab.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,12 @@ const PagedGrid = () => {
8787
: ((categories.find((category) => category.id === activeCategoryId) ?? categories[0])
8888
?.emojis ?? []);
8989

90+
// A plain (non-virtualized) grid must bring its own scroll — the default grid gets it
91+
// from Virtuoso. `__grid-container` is the SDK's scrollable body class (block-size:100%
92+
// + overflow-y), the same one the built-in search-results view uses.
9093
return (
9194
<div className='str-chat__emoji-picker__body'>
92-
<div className='str-chat__emoji-picker__grid'>
95+
<div className='str-chat__emoji-picker__grid-container'>
9396
<div className='str-chat__emoji-picker__category-emojis'>
9497
{emojis.map((emoji) => (
9598
<button

0 commit comments

Comments
 (0)