Validation on new row always has rowData undefined
simontherry opened this issue · comments
Hi,
The signature of validation provides the following function:
export declare type ValidationFunc = (props: {
value: any;
rowData: any;
column: Column;
}) => string | void;
However, when saving a new row, the following occurs:
var updatedRowData_1 = data.find(function (d) { return DataUtils_1.getValueByField(d, rowKeyField) === rowEditorKeyValue_1; });
Where the "data" does not contain the row that was just added, so in the code below:
cell.validationMessage = validation && validation({
column: column,
value: cell.editorValue,
rowData: updatedRowData_1
});
the validation function does not inject the correct rowData.
Can this be fixed such that rowData in the validation func is the data from the newly added row?
Thanks!
Hi @simontherry
can you share the stackblitz link with the issue https://stackblitz.com/edit/table-add-row-ts?file=Demo.tsx
looks like it is the similar with #274 and it should be already fixed
Indeed seems to be the same issue. Any idea when we can expect the new version?
@simontherry It is already released. Use v7.8.4