Last active
October 31, 2021 08:15
-
-
Save kwbtdisk/af65425b25f7ec4b9fa893249c05d689 to your computer and use it in GitHub Desktop.
CORE Framework editCallback の使い方 https://youtu.be/U9ItZbuJMHg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ## editCallback の使い方 | |
* - 例: "勘定科目" を選択して、値が変更されているなら、 "種別" をクリアする | |
* - "勘定科目" (accoutingType) のeditCallback関数を追加する | |
*/ | |
{ | |
editCallback: ({row, newValue, oldValue}) => { | |
console.log({row, newValue, oldValue}) | |
// row: 現在編集しているデータ | |
// row.accoutingType | |
// 変更があるなら、種別 (category) を空にする | |
if (newValue !== oldValue) { | |
console.log({row, newValue, oldValue}) | |
debugger | |
row.category = '' | |
} | |
return row | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment