Skip to content

Commit

Permalink
refactor(structure): add virtualization when rendering assigneeds list
Browse files Browse the repository at this point in the history
  • Loading branch information
RitaDias committed Sep 23, 2024
1 parent 7c814a8 commit 83ce08d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
MenuItem,
Text,
TextInput,
VirtualList,
} from '@sanity/ui'
import {deburr} from 'lodash'
import {type ChangeEvent, type KeyboardEvent, useCallback, useMemo, useRef, useState} from 'react'
Expand Down Expand Up @@ -172,7 +173,7 @@ function MentionsMenu({onSelect, value = ''}: {onSelect: SelectItemHandler; valu
</Text>
</Box>
) : (
filteredOptions.map(renderItem)
<VirtualList items={filteredOptions} renderItem={renderItem} />
)}
</div>
</div>
Expand Down

0 comments on commit 83ce08d

Please sign in to comment.