Skip to content

Commit 25ca833

Browse files
authored
Merge pull request #102 from mckervinc/feature/subcomponent
Add Column Widths to SubComponent
2 parents c1cefbf + a348bdc commit 25ca833

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# CHANGELOG
22

3+
## 1.5.2
4+
5+
_2025-08-28_
6+
7+
### Features
8+
9+
- added `widths` prop to the SubComponent
10+
311
## 1.5.1
412

513
_2025-06-16_

index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export type SubComponentProps<T> = {
7474
* whether or not the row is expanded
7575
*/
7676
isExpanded: boolean;
77+
/**
78+
* exposes the widths of each column to the sub component
79+
*/
80+
widths: number[];
7781
};
7882

7983
export type FooterProps<T> = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-fluid-table",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "A React table inspired by @tanstack/react-virtual",
55
"author": "Mckervin Ceme <mckervinc@live.com>",
66
"license": "MIT",

src/components/Row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function BaseRow<T>(
167167
))}
168168
{!!SubComponent && (
169169
<div className={cx("rft-sub-component", !isExpanded && "rft-hidden")}>
170-
<SubComponent row={row} index={index} isExpanded={isExpanded} />
170+
<SubComponent row={row} index={index} isExpanded={isExpanded} widths={pixelWidths} />
171171
</div>
172172
)}
173173
</div>

0 commit comments

Comments
 (0)