Skip to content

Commit 60e98ed

Browse files
committed
more style changes
1 parent 7086c74 commit 60e98ed

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

example/src/examples/07-controlled.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import {
23
randCatchPhrase,
34
randCity,
@@ -104,7 +105,7 @@ const Controlled = ({ data, height, columns: variableColumns }: ControlledProps)
104105
<StyledTable
105106
borders
106107
data={rows}
107-
columns={variableColumns}
108+
columns={variableColumns as unknown as any[]}
108109
tableHeight={height}
109110
rowHeight={35}
110111
onSort={onSort}

example/src/examples/08-header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import _ from "lodash";
23
import React, { useState } from "react";
34
import { ColumnProps, HeaderProps, SortDirection, Table } from "react-fluid-table";
@@ -19,7 +20,7 @@ const HeaderCell = ({ name, sortDirection, style, onClick }: HeaderCellProps) =>
1920
<Arrow size="small" name={`chevron ${sortDirection === "ASC" ? "up" : "down"}`} />
2021
);
2122

22-
const cellStyle = {
23+
const cellStyle: any = {
2324
background: sortDirection ? "rgb(39, 40, 34)" : undefined,
2425
...style
2526
};

example/src/examples/10-footer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import { useEffect, useRef, useState } from "react";
23
import { ColumnProps, FooterProps, Table } from "react-fluid-table";
34
import { Checkbox, Form, Grid, Icon, Input, Radio } from "semantic-ui-react";
@@ -192,11 +193,11 @@ const Example10 = () => {
192193
<StyledTable
193194
borders
194195
data={testData.slice(0, 30)}
195-
columns={columns}
196+
columns={columns as unknown as any[]}
196197
stickyFooter={sticky}
197198
tableHeight={400}
198199
footerStyle={{ backgroundColor: "white" }}
199-
footerComponent={InnerFooter}
200+
footerComponent={InnerFooter as unknown as any}
200201
/>
201202
</>
202203
);

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export type ColumnProps<T> = {
172172
/**
173173
* specifies whether or not to display a footer cell
174174
*/
175-
footer?: (props: FooterCellProps<T>) => ReactNode;
175+
footer?: (props: FooterCellProps<T>) => ReactNode | JSX.Element;
176176
};
177177

178178
export type TableRef = {
@@ -310,7 +310,7 @@ export type TableProps<T> = {
310310
/**
311311
* When a column has `expander`, this component will be rendered under the row.
312312
*/
313-
subComponent?: (props: SubComponentProps<T>) => ReactNode;
313+
subComponent?: (props: SubComponentProps<T>) => ReactNode | JSX.Element;
314314
/**
315315
* The callback that gets called every time a row is clicked.
316316
*/

0 commit comments

Comments
 (0)