|
@@ -71,10 +71,12 @@ const EditForm = ({record, models={}, model, options=defaultAdminOptions, Compon
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
{record._id && record.save &&
|
|
{record._id && record.save &&
|
|
- <button onClick={() => {
|
|
|
|
|
|
+ <button onClick={async () => {
|
|
|
|
+ await record;
|
|
Object.assign(record, edit);
|
|
Object.assign(record, edit);
|
|
- if ('_id' in record && 'save' in record)
|
|
|
|
|
|
+ if ('_id' in record && 'save' in record){
|
|
record.save()
|
|
record.save()
|
|
|
|
+ }
|
|
}}>
|
|
}}>
|
|
Save
|
|
Save
|
|
</button>}
|
|
</button>}
|