Skip to content

Commit

Permalink
fix: virtuoso scroller bottom not padding
Browse files Browse the repository at this point in the history
  • Loading branch information
keiko233 committed Jan 6, 2024
1 parent 0e64c0d commit be3d99c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/components/proxy/use-render-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import {
} from "./use-head-state";

export interface IRenderItem {
// 组 | head | item | empty | item col | item bottom
type: 0 | 1 | 2 | 3 | 4 | 5;
// 组 | head | item | empty | item col | item bottom | empty-padding
type: 0 | 1 | 2 | 3 | 4 | 5 | 6;
key: string;
group: IProxyGroupItem;
group?: IProxyGroupItem;
proxy?: IProxyItem;
col?: number;
proxyCol?: IProxyItem[];
Expand Down Expand Up @@ -123,16 +123,23 @@ export const useRenderList = (mode: string) => {
lists.push({
type: 5,
key: `footer-${group.name}`,
group,
headState,
});

return lists;
}

return ret;
});

if (!useRule) return retList.slice(1);

console.log(retList);

retList.push({
type: 6,
key: `empty-padding`,
});

return retList;
}, [headStates, proxiesData, mode, col]);

Expand Down

0 comments on commit be3d99c

Please sign in to comment.