본문으로 건너뛰기

beforeCellsValidation

설명

swimlane의 셀이 검증되기 전에 발생합니다

사용법

beforeCellsValidation: (
swimlaneId: string | number,
action: "move" | "remove" | "add"
) => boolean | void;

매개변수

이 이벤트의 콜백은 다음 매개변수를 받습니다:

  • swimlaneId - (필수) 항목의 ID
  • action - (필수) 동작의 유형

반환값

새로운 셀의 검증을 방지하려면 false를 반환하고, 그렇지 않으면 true를 반환합니다

예제

// Diagram 초기화
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
});
// 데이터 로드
diagram.data.parse(data);

// 이벤트에 핸들러 연결
diagram.events.on("beforeCellsValidation", (swimlaneId, action) => {
console.log(swimlaneId, action);
return true;
});

변경 로그: v4.0에서 추가

관련 문서: Swimlane 구성