Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
iddan committed Dec 30, 2024
1 parent 0269ac6 commit 605e74e
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 78 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"array.prototype.flatmap": "^1.2.5",
"classnames": "^2.3.1",
"fast-formula-parser": "^1.0.19",
"use-context-selector": "^1.3.7"
"use-context-selector": "^2.0.0"
},
"devDependencies": {
"@babel/preset-env": "^7.21.4",
Expand Down Expand Up @@ -81,7 +81,7 @@
"prop-types": "^15.8.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-select": "^4.0.2",
"react-select": "^5.9.0",
"rollup": "^3.20.2",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-postcss": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Row.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from "react";
import { render } from "@testing-library/react";
import Row from "./Row";

const wrapper: React.FC = ({ children }) => {
const wrapper = ({ children }: { children?: React.ReactNode }) => {
return (
<table>
<tbody>{children}</tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/stories/CustomCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const CustomCell: CellComponent = ({
}, [rootRef, active, mode]);

const handleMouseDown = React.useCallback(
(event) => {
(event: React.MouseEvent<HTMLTableCellElement>) => {
if (mode === "view") {
if (event.shiftKey) {
select({ row, column });
Expand Down
3 changes: 2 additions & 1 deletion src/stories/SelectDataComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const SelectEdit: DataEditorComponent<Cell> = ({
exitEditMode,
}) => {
const handleChange = React.useCallback(
(selection) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(selection: any) => {
onChange({ ...cell, value: selection ? selection.value : null });
},
[cell, onChange]
Expand Down
12 changes: 1 addition & 11 deletions src/stories/Spreadsheet.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ const meta: Meta<Props<StringCell>> = {
args: {
data: EMPTY_DATA,
},
argTypes: {
columnLabels: {
control: "array",
defaultValue: [],
},
rowLabels: {
control: "array",
defaultValue: [],
},
},
decorators: [
(Story): React.ReactElement => (
<div
Expand Down Expand Up @@ -229,7 +219,7 @@ export const Filter: StoryFn<Props<StringCell>> = (props) => {
const [filter, setFilter] = React.useState("");

const handleFilterChange = React.useCallback(
(event) => {
(event: React.ChangeEvent<HTMLInputElement>) => {
const nextFilter = event.target.value;
setFilter(nextFilter);
},
Expand Down
Loading

0 comments on commit 605e74e

Please sign in to comment.