Skip to content

Commit

Permalink
fix the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
arvid220u committed Jul 11, 2022
1 parent 33e39cc commit 5a3a345
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions gui/src/renderer/components/SelectableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,13 @@ export function SelectableList<T>({
}}
{...handlers}
>
{React.cloneElement(
onRender({
item,
active,
}),
{
ref: virtualRow.measureRef,
}
)}
{/* This is a hack to make the list resize when a single item changes. See https://github.com/TanStack/virtual/issues/85.
React-virtual v3 has the function virtualizer.measure() which we could call instead, and which would be better than this.
When that becomes stable we should use that instead.
*/}
<div ref={(element) => virtualRow.measureRef(element)}>
{onRender({ item, active })}
</div>
</div>
);
})}
Expand Down

0 comments on commit 5a3a345

Please sign in to comment.