Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
787ef01
Updated virtualization logic to avoid re-rendering
Anders2303 Aug 13, 2025
a0e7c10
Fixed mountScrollEffect deps and container reference
Anders2303 Aug 18, 2025
592d99b
Made index be handled more controlled/uncontrolled
Anders2303 Aug 18, 2025
e4699bb
Added overscan prop
Anders2303 Aug 18, 2025
334384e
Added comments doc-comments to prop types
Anders2303 Aug 18, 2025
73d9d6e
Merge branch 'main' into patch/virtualization_scroll_reset
Anders2303 Aug 18, 2025
248777c
Made "range" more clearly defined:
Anders2303 Aug 19, 2025
2dbd744
Fixed wrong index in rendered items
Anders2303 Aug 19, 2025
53420d0
Added flag to avoid scroll adjustments while actively scrolling
Anders2303 Aug 19, 2025
fdc43bf
Added example of each virtualized component to my-module-2
Anders2303 Aug 19, 2025
a7439e4
Fixed smaller issues in virtualized components
Anders2303 Aug 19, 2025
0b3b5bf
Made scroll event listener passive
Anders2303 Aug 19, 2025
a0fe74e
Merge branch 'main' into patch/virtualization_scroll_reset
Anders2303 Aug 19, 2025
60f1acb
Added missing awaits for playwright tests
Anders2303 Aug 20, 2025
afe162e
Merge branch 'main' into patch/virtualization_scroll_reset
Anders2303 Aug 22, 2025
b63a77f
Merge branch 'main' into patch/virtualization_scroll_reset
Anders2303 Sep 19, 2025
60bf007
Merge branch 'main' into patch/virtualization_scroll_reset
Anders2303 Oct 21, 2025
af0683a
Fixed merge error
Anders2303 Oct 21, 2025
67f1d0b
Fixed error in select comp. Move keyboard navigation to dedicated hook
Anders2303 Oct 23, 2025
1deb426
Updated myModule2 to test new Select states
Anders2303 Oct 23, 2025
84805b3
Made Virtualizer add keys by default, and added a prop to customize k…
Anders2303 Oct 23, 2025
cead835
Merge branch 'main' into patch/virtualization_scroll_reset
Anders2303 Nov 19, 2025
b935c5f
Merge branch 'main' into patch/virtualization_scroll_reset
Anders2303 Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions frontend/src/lib/components/Dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,10 @@ function DropdownComponent<TValue = string>(props: DropdownProps<TValue>, ref: R

function renderItem(item: OptionOrTitle<TValue>, index: number) {
if (item.type === ItemType.GROUP_TITLE) {
return <GroupTitle key={`${item.label}-${index}`} {...item} />;
return <GroupTitle {...item} />;
} else {
return (
<OptionItem
key={`${item.value}`}
isSelected={_.isEqual(selectedValue, item.value)}
isFocused={optionIndexWithFocus === index}
isInGroup={!!item.parent}
Expand All @@ -527,6 +526,11 @@ function DropdownComponent<TValue = string>(props: DropdownProps<TValue>, ref: R
}
}

function makeItemKey(item: OptionOrTitle<TValue>, index: number) {
if (item.type === ItemType.GROUP_TITLE) return `${item.label}-${index}`;
return `${item.value}`;
}

return (
<BaseComponent ref={ref} disabled={props.disabled}>
<div style={{ width: props.width }} id={props.wrapperId} className="flex hover input-comp rounded-sm">
Expand Down Expand Up @@ -614,6 +618,7 @@ function DropdownComponent<TValue = string>(props: DropdownProps<TValue>, ref: R
itemSize={OPTION_HEIGHT}
containerRef={dropdownRef}
startIndex={startIndex}
makeKey={makeItemKey}
renderItem={renderItem}
/>
</ul>
Expand Down
Loading
Loading