In the renderer - ActionsRenderer
Below are the changes I made.
export default forwardRef((props, ref) => {
...
let [updateDisabled, setUpdateDisabled] = useState(false);
...
useImperativeHandle(ref, () => ({
exposedUpdateDisabled: setUpdateDisabled,
}));
})
In the validator - AsyncValidationEditor(or whatever editor you plan to use)
get the instance of the actions renderer and update the renderer in your validator logic.
export default forwardRef((props, ref) => {
...
useEffect(() => {
...
new Promise(...)
.then((valid) => {
setValid(valid);
setValidating(false);
// get actions renderer for this row
const actionInstance =
props.api.getCellRendererInstances({
rowNodes: [props.node],
columns: ['actions'],
})[0].componentInstance;
// use exposed api to update state on the renderer
actionInstance.exposedUpdateDisabled(!valid);
...
}, [debouncedInputVal]);
})