Tooltip changes ready
This commit is contained in:
1 parent
69728bb7a3
commit
507e8a4d69
9 files changed
+90
-346
No files matched your search
+6
-7
@@ -1,8 +1,8 @@
|
||||
import React from "react";
|
||||
import "gantt-task-react/dist/index.css";
|
||||
import { Task, ViewMode, Gantt } from "gantt-task-react";
|
||||
import { ViewSwitcher } from "./components/view-switcher";
|
||||
import { initTasks } from "./helper";
|
||||
import "gantt-task-react/dist/index.css";
|
||||
|
||||
//Init
|
||||
const App = () => {
|
||||
@@ -16,14 +16,13 @@ const App = () => {
|
||||
columnWidth = 250;
|
||||
}
|
||||
|
||||
let onTaskChange = (task: Task) => {
|
||||
const onTaskChange = (task: Task) => {
|
||||
console.log("On date change Id:" + task.id);
|
||||
debugger;
|
||||
const newTasks = tasks.map(t => (t.id === task.id ? task : t));
|
||||
setTasks(newTasks);
|
||||
};
|
||||
|
||||
let onTaskDelete = (task: Task) => {
|
||||
const onTaskDelete = (task: Task) => {
|
||||
const conf = window.confirm("Are you sure about " + task.name + " ?");
|
||||
if (conf) {
|
||||
setTasks(tasks.filter(t => t.id !== task.id));
|
||||
@@ -31,16 +30,16 @@ const App = () => {
|
||||
return conf;
|
||||
};
|
||||
|
||||
let onProgressChange = async (task: Task) => {
|
||||
const onProgressChange = async (task: Task) => {
|
||||
setTasks(tasks.map(t => (t.id === task.id ? task : t)));
|
||||
console.log("On progress change Id:" + task.id);
|
||||
};
|
||||
|
||||
let onDblClick = (task: Task) => {
|
||||
const onDblClick = (task: Task) => {
|
||||
alert("On Double Click event Id:" + task.id);
|
||||
};
|
||||
|
||||
let onSelect = (task: Task, isSelected: boolean) => {
|
||||
const onSelect = (task: Task, isSelected: boolean) => {
|
||||
console.log(task.name + " has " + (isSelected ? "selected" : "unselected"));
|
||||
};
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ export function initTasks() {
|
||||
{
|
||||
start: new Date(currentDate.getFullYear(), currentDate.getMonth(), 24),
|
||||
end: new Date(currentDate.getFullYear(), currentDate.getMonth(), 25),
|
||||
name: "Closing",
|
||||
name: "Party Time",
|
||||
id: "Task 9",
|
||||
progress: 0,
|
||||
isDisabled: true,
|
||||
|
||||
Reference in new issue
Block a user