주요 콘텐츠로 건너뛰기

close-inline-editor

설명

작업/프로젝트의 인라인 편집기를 닫을 때 발생합니다

사용법

"close-inline-editor": ({
id: string | number,
save: boolean
}) => void;

매개변수

close-inline-editor 이벤트의 콜백은 다음 매개변수를 포함한 객체를 받을 수 있습니다:

  • id - (필수) 작업/프로젝트의 ID
  • save - (필수) 편집기를 닫은 후 변경 내용이 저장된 경우 true, 그렇지 않으면 false
정보

내부 이벤트를 처리하려면 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,
});

// "close-inline-editor" 이벤트 구독
list.api.on("close-inline-editor", ({id, save}) => {
console.log("The inline editor is closed for the", id, "item");
});

관련 문서: 인라인 편집