주요 콘텐츠로 건너뛰기

indent-task

설명

태스크의 중첩 레벨이 한 단계 낮아질 때 발생합니다

사용법

"indent-task": ({
id: string | number
}) => void;

매개변수

indent-task 이벤트의 callback은 다음 매개변수를 포함하는 객체를 받을 수 있습니다:

  • id - (필수) 태스크의 ID
정보

내부 이벤트를 처리하려면 Event Bus 메서드를 사용할 수 있습니다

예제

const { ToDo, Toolbar } = todo;
const {tasks, projects, users} = getData();

const list = new ToDo("#root", {
tasks,
projects,
users
});

const toolbar = new Toolbar("#toolbar", {
api: list.api,
});

// "indent-task" 이벤트 구독
list.api.on("indent-task", ({id}) => {
console.log("The nesting level of the", id, "task is demoted by one");
});

관련 문서: 태스크 작업