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