Skip to content

Commit c6a8e2a

Browse files
authored
Merge pull request #82 from mckervinc/feature/heights
Feature: Add footer prop to columns array
2 parents 7748dbb + 29e2a2f commit c6a8e2a

19 files changed

+975
-120
lines changed

CHANGELOG.md

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

3+
## 0.4.7
4+
5+
_2023-09-28_
6+
7+
### Features
8+
9+
- added a `footer` prop to each `column` object in the `columns` array. allows the user to create footer cell columns.
10+
- `footerComponent` will still provide a more customizable footer experience
11+
- hopefully fix issues with the auto-calculation of tables when `minTableHeight` and/or `maxTableHeight` is used.
12+
- slimmed down some of the opinionated CSS, giving the user more control over header and body styles
13+
314
## 0.4.6
415

516
_2023-09-28_

example/src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Example7, Source as Example7Code } from "./examples/07-controlled";
1111
import { Example8, Source as Example8Code } from "./examples/08-header";
1212
import { Example9, Source as Example9Code } from "./examples/09-scroll";
1313
import { Example10, Source as Example10Code } from "./examples/10-footer";
14+
import { Example11, Source as Example11Code } from "./examples/11-heights";
1415

1516
const router = createHashRouter([
1617
{
@@ -93,6 +94,14 @@ const router = createHashRouter([
9394
</Page>
9495
)
9596
},
97+
{
98+
path: "/heights",
99+
element: (
100+
<Page title="Table Heights" code={Example11Code}>
101+
<Example11 />
102+
</Page>
103+
)
104+
},
96105
{
97106
path: "/props",
98107
element: (

example/src/ColumnProps.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import styled from "styled-components";
44
import { InlineCode } from "./components/library/InlineCode";
55

66
const StyledTable = styled(Table)`
7+
border: 1px solid #ececec;
8+
79
.react-fluid-table-header {
810
background-color: #282a36;
911
}
@@ -121,6 +123,17 @@ const data: PropData[] = [
121123
property is defined, then <code>content</code> will be igored.
122124
</div>
123125
)
126+
},
127+
{
128+
prop: "footer",
129+
type: "FooterElement",
130+
description: (
131+
<div>
132+
This property allows you to customize the content inside of a footer cell. The library will create
133+
a cell container for you with the proper column widths and resizability. If this field is
134+
defined, then this will get rendered inside of the cell container in the footer.
135+
</div>
136+
)
124137
}
125138
];
126139

example/src/Page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ const LinkContainer = () => (
9696
<Menu.Item as={Link} to="/scroll">
9797
Methods
9898
</Menu.Item>
99+
<Menu.Item as={Link} to="/heights">
100+
Table Heights
101+
</Menu.Item>
99102
<Menu.Item as={Link} to="/footer">
100103
Footer
101104
</Menu.Item>

0 commit comments

Comments
 (0)