react version update

This commit is contained in:
lisaavikarii committed 2022-06-28 20:20:37 +02:00
1 parent 0aed9cbe72
commit 47196d3047
9 files changed
+126 -364

No files matched your search

+4 -8
View File
@@ -278,15 +278,11 @@ export const Gantt: React.FunctionComponent<GanttProps> = ({
};
// subscribe if scroll is necessary
if (wrapperRef.current) {
wrapperRef.current.addEventListener("wheel", handleWheel, {
passive: false,
});
}
wrapperRef.current?.addEventListener("wheel", handleWheel, {
passive: false,
});
return () => {
if (wrapperRef.current) {
wrapperRef.current.removeEventListener("wheel", handleWheel);
}
wrapperRef.current?.removeEventListener("wheel", handleWheel);
};
}, [
wrapperRef,
@@ -1,6 +1,10 @@
.scrollWrapper {
overflow: auto;
max-width: 100%;
/*firefox*/
scrollbar-width: thin;
/*iPad*/
height: 1.1rem;
}
.scrollWrapper::-webkit-scrollbar {
width: 1.1rem;
@@ -2,6 +2,8 @@
overflow: hidden auto;
width: 17px;
flex-shrink: 0;
/*firefox*/
scrollbar-width: thin;
}
.scroll::-webkit-scrollbar {
width: 1.1rem;
+4 -5
View File
@@ -1,11 +1,12 @@
import React from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";
import { Gantt } from "../index";
describe("gantt", () => {
it("renders without crashing", () => {
const div = document.createElement("div");
ReactDOM.render(
const root = createRoot(div);
root.render(
<Gantt
tasks={[
{
@@ -17,9 +18,7 @@ describe("gantt", () => {
type: "task",
},
]}
/>,
div
/>
);
ReactDOM.unmountComponentAtNode(div);
});
});