fix: missing name in ID field

This commit is contained in:
Alessio Gravili
2024-03-18 16:06:22 -04:00
parent 4e650e17aa
commit 976d86ae1a

View File

@@ -679,7 +679,9 @@ export const mapFields = (args: {
result.findIndex((f) => 'name' in f && f.isFieldAffectingData && f.name === 'id') > -1 result.findIndex((f) => 'name' in f && f.isFieldAffectingData && f.name === 'id') > -1
if (!disableAddingID && !hasID) { if (!disableAddingID && !hasID) {
// TODO: For all fields (not just this one) we need to add the name to both .fieldComponentProps.name AND .name. This can probably be improved
result.push({ result.push({
name: 'id',
type: 'text', type: 'text',
Cell: DefaultCell ? <DefaultCell name="id" /> : null, Cell: DefaultCell ? <DefaultCell name="id" /> : null,
Heading: <SortColumn label="ID" name="id" />, Heading: <SortColumn label="ID" name="id" />,