Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Jul 7, 2024
1 parent 61c5127 commit 342a708
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/solid/Virtualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ export const Virtualizer = <T,>(props: VirtualizerProps<T>): JSX.Element => {
createComputed(
on(
() => props.data.length,
(len, prevLen) => {
if (exists(prevLen) && len !== prevLen) {
store._update(ACTION_ITEMS_LENGTH_CHANGE, [len, props.shift]);
(count) => {
if (count !== store._getItemsLength()) {
store._update(ACTION_ITEMS_LENGTH_CHANGE, [count, props.shift]);
}
}
)
Expand Down

0 comments on commit 342a708

Please sign in to comment.