Fields, widgets and templates in a layout grid cell get the property name as name
Detect
- In a custom field (including one a cell names by
ui:field), widget,FieldTemplateorWrapIfAdditionalTemplaterendered in a layout grid cell: code that reads a dotted path such asperson.address.cityfromnameorkeyName.
Change
The cell's name is the name prop of its field and of its widget, and the keyName of its WrapIfAdditionalTemplate, so all of them now get the property name, city. A field or FieldTemplate reads the full path from fieldPath, which is unchanged:
-const path = props.name;
+const path = props.fieldPath;
A widget or WrapIfAdditionalTemplate is handed no fieldPath. One that needs the path takes it from the custom field or FieldTemplate that renders it. A cell with a render component still hands it the dotted path as name.
Verify
- Your components inside a grid find the full path, and code that wants the property name reads
name.
Also read: