Skip to content

Commit

Permalink
fix: fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
li-jia-nan committed Sep 28, 2024
1 parent 5524853 commit 99f61c8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/VirtualTable/BodyLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ const BodyLine = React.forwardRef<HTMLDivElement, BodyLineProps>((props, ref) =>
let expandRowNode: React.ReactElement;
if (rowSupportExpand && expanded) {
const expandContent = expandedRowRender(record, index, indent + 1, expanded);
const computedExpandedRowClassName = expandedRowClassName?.(record, index, indent);

let computedExpandedRowClassName = '';

if (typeof expandedRowClassName === 'string') {
computedExpandedRowClassName = expandedRowClassName;
}

Check warning on line 49 in src/VirtualTable/BodyLine.tsx

View check run for this annotation

Codecov / codecov/patch

src/VirtualTable/BodyLine.tsx#L48-L49

Added lines #L48 - L49 were not covered by tests
if (typeof expandedRowClassName === 'function') {
computedExpandedRowClassName = expandedRowClassName(record, index, indent);
}

Check warning on line 52 in src/VirtualTable/BodyLine.tsx

View check run for this annotation

Codecov / codecov/patch

src/VirtualTable/BodyLine.tsx#L51-L52

Added lines #L51 - L52 were not covered by tests

let additionalProps: React.TdHTMLAttributes<HTMLElement> = {};
if (fixColumn) {
Expand Down

0 comments on commit 99f61c8

Please sign in to comment.