In my view, I want to be able to edit fields on both equipment and job, so my query is for equipment_jobs. Do the edit-* functions allow me to access parent objects of join tables so that I can, e.g. edit a job start_date or end_date without adding more UI components?
Yes, this is possible. Let's take edit-text and edit-date as examples. This will require very little effort from the xml, and a bit more in the javascript to accomplish.
Here is the example table xml for the above join table I want to edit:
And the corresponding javascript function to interpret the on-change logic:
function handleParentUpdate(object, newValue, oldValue, parentObjType, field) {
// pass in the parentObjType to make this function re-usable
var objectToUpdate = object[parentObjType]();
objectToUpdate[field] = newValue;
objectToUpdate.save();
}
Now you can update any parent property from your join table without creating additional UI elements.