nhn / tui.grid

🍞🔡 The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
http://ui.toast.com/tui-grid/
MIT License
2.42k stars 394 forks source link

blur 이나 finishEditing 후 validate 작동 하지 않는 현상 #1918

Closed yoosewon81 closed 1 year ago

yoosewon81 commented 1 year ago

data를 저장 하기 위해 함수를 만들고 vaidation 전에 input의 edit mode를 없애기 위해 blur()이나 finishEditing를 사용하고 있는데.. 이를 사용하면 validate() 가 작동하지 않습니다.

소스는 아래와 같습니다.

toastGrid.blur();

// toastGrid.blur(); 이나 아래 finishEditing을 사용 합니다.

//const { rowKey, columnName } = toastGrid.getFocusedCell();

//if ((rowKey >= 0) && columnName) { // toastGrid.finishEditing(rowKey, columnName); //}

let validation = toastGrid.validate();

console.log(validation);

yoosewon81 commented 1 year ago

확인해보니 editor의 afterchange에서 class 값을 변경하니 발생하는 문제였습니다. 좀 더 확인이 필요할 것 같습니다.