From 764c0932126f5cc2f8359a8854cccebb0456afb0 Mon Sep 17 00:00:00 2001 From: Lansana DIOMANDE Date: Mon, 13 Nov 2023 09:24:43 +0000 Subject: [PATCH] fix(virtual-table): make virtual use components props --- .gitpod.yml | 11 +++++++++++ src/VirtualTable/index.tsx | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..e48fbe548 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,11 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: npm install && npm run compile + command: npm run start + + diff --git a/src/VirtualTable/index.tsx b/src/VirtualTable/index.tsx index 7f8b07433..eb59f7ff1 100644 --- a/src/VirtualTable/index.tsx +++ b/src/VirtualTable/index.tsx @@ -24,7 +24,15 @@ export interface VirtualTableProps extends Omit(props: VirtualTableProps, ref: React.Ref) { - const { columns, scroll, sticky, prefixCls = DEFAULT_PREFIX, className, listItemHeight } = props; + const { + columns, + scroll, + sticky, + prefixCls = DEFAULT_PREFIX, + className, + listItemHeight, + components, + } = props; let { x: scrollX, y: scrollY } = scroll || {}; @@ -63,6 +71,7 @@ function VirtualTable(props: VirtualTableProps, ref: Rea x: scrollX, }} components={{ + ...components, body: renderBody, }} columns={columns}