我在读 newValueHandler
从GitHub和StackOverflow的问题。但我似乎无法在它在 ag-grid
网站。谷歌搜索给出了这个链接(https:/www.ag-grid.comjavascript-grid-value-handlers) 当我搜索 newValueHandler
但它完全是空白的。
所以,是 newValueHandler
弃用?是否还能安全地使用它,或者我应该换成其他的东西?谅谅
注 我正在使用最新版本的ag-grid与Angular 9。
我使用的是ag-grid的最新版本(23.1.0),这个方法就在那里。它可能不在在线文档中,但它仍然在ColDef类的源代码中。
这里有一份ColDef.d.ts的方法签名和文档。
/** Callbacks for editing. See editing section for further details.
* Return true if the update was successful, or false if not.
* If false, then skips the UI refresh and no events are emitted.
* Return false if the values are the same (ie no update). */
newValueHandler?: (params: any) => boolean;
所以,它没有被标记为废弃,我认为它可以安全使用。