Skip to content

Instantly share code, notes, and snippets.

@kwbtdisk
Last active October 31, 2021 08:15
Show Gist options
  • Save kwbtdisk/af65425b25f7ec4b9fa893249c05d689 to your computer and use it in GitHub Desktop.
Save kwbtdisk/af65425b25f7ec4b9fa893249c05d689 to your computer and use it in GitHub Desktop.
CORE Framework editCallback の使い方 https://youtu.be/U9ItZbuJMHg
/**
* ## 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