Skip to content

Commit

Permalink
Fix: work around TS build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
forabi committed Mar 18, 2019
1 parent 9c64f4f commit bbe0f08
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@types/lodash": "4.14.120",
"@types/mousetrap": "^1.6.1",
"@types/node": "^11.10.4",
"@types/react": "^16.8.6",
"@types/react": "^16.8.8",
"@types/react-dom": "^16.8.2",
"@types/stylelint": "^9.4.2",
"@typescript-eslint/eslint-plugin": "^1.4.2",
Expand Down
4 changes: 4 additions & 0 deletions src/components/RangeBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ export const RangeBox = React.memo(function RangeBox({
);

const handleDelete = useCallback(() => {
if (!onChange) {
return;
}

onChange(undefined, rangeIndex);
}, [onChange, rangeIndex]);

Expand Down
8 changes: 2 additions & 6 deletions src/components/Schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import {
CellInfo,
ClassNames,
DateRange,
EventRootProps,
Grid,
OnChangeCallback,
ScheduleType,
} from '../types';
import { EventContent } from './EventContent';
import { RangeBox } from './RangeBox';

export type ScheduleProps = {
Expand All @@ -22,10 +20,8 @@ export type ScheduleProps = {
onActiveChange?(index: [number, number] | [null, null]): void;
onClick?(index: [number, number] | [null, null]): void;
getIsActive(indexes: { cellIndex: number; rangeIndex: number }): boolean;
eventContentComponent?: React.ElementType<
React.ComponentProps<typeof EventContent>
>;
eventRootComponent?: React.ElementType<EventRootProps>;
eventContentComponent?: any;
eventRootComponent?: any;
};

export const Schedule = React.memo(function Schedule({
Expand Down
10 changes: 9 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1135,14 +1135,22 @@
dependencies:
"@types/react" "*"

"@types/react@*", "@types/react@^16.8.6":
"@types/react@*":
version "16.8.6"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.6.tgz#fa1de3fe56cc9b6afeddc73d093d7f30fd5e31cc"
integrity sha512-bN9qDjEMltmHrl0PZRI4IF2AbB7V5UlRfG+OOduckVnRQ4VzXVSzy/1eLAh778IEqhTnW0mmgL9yShfinNverA==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"

"@types/react@^16.8.8":
version "16.8.8"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.8.tgz#4b60a469fd2469f7aa6eaa0f8cfbc51f6d76e662"
integrity sha512-xwEvyet96u7WnB96kqY0yY7qxx/pEpU51QeACkKFtrgjjXITQn0oO1iwPEraXVgh10ZFPix7gs1R4OJXF7P5sg==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"

"@types/stylelint@^9.4.2":
version "9.4.2"
resolved "https://registry.yarnpkg.com/@types/stylelint/-/stylelint-9.4.2.tgz#6c5d75d96a1ee947365697dafcae2c7b8e036107"
Expand Down

0 comments on commit bbe0f08

Please sign in to comment.