dfaruque / Serenity.Extra

Name of the repo says that this is an EXTRA of http://serenity.is platform
60 stars 34 forks source link

DialogBase.ts onClick event does not work if row IdField is different from 'id' #6

Closed YYOHAN closed 6 years ago

YYOHAN commented 6 years ago

line 102 of DialogBase.ts should be:

buttons.push({
                        title: 'Change Log',
                        icon: 'fa fa-history',
                        onClick: () => {
                                     let idProperty = this[['getIdProperty']]();
                                     let entityId = this.entity[idProperty];
                                      if (entityId) {
                                           let dlg = new AuditLogViewerDialog({ FormKey: this.getFormKey(), EntityId: entityId });
                                dlg.dialogOpen();
                            } else {
                                Q.alert('No change log found for this entity.')
                            }
                        }
                    })

as in line 69...

Very nice work...Thank you for sharing...

dfaruque commented 6 years ago

Thank you. Next version will come with this fix.