Skip to content

Commit

Permalink
fix: virtual list not update height for dynamic data
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Apr 6, 2022
1 parent 48ade76 commit 4a4670b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/vc-virtual-list/hooks/useHeights.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ export default function useHeights<T>(
onItemRemove?: ((item: T) => void) | null,
): [(item: T, instance: HTMLElement) => void, () => void, CacheMap, Ref<Symbol>] {
const instance = new Map<VNodeProps['key'], HTMLElement>();
let heights = new Map();
const heights = new Map();
const updatedMark = ref(Symbol('update'));
watch(mergedData, () => {
heights = new Map();
updatedMark.value = Symbol('update');
});
let heightUpdateId = 0;
Expand Down

0 comments on commit 4a4670b

Please sign in to comment.