feat(12.1-01): list row states from one controller call per page
- pact.ListRowStates with the fixed RowState set deleted, negative, disabled - list response meta.row_states keyed by row id; unknown values dropped - list messages rowStateDeleted, rowStateNegative, rowStateDisabled - update writes through the scope the load used, so a soft-deleted record a controller includes stays soft-deleted - DataTable row state badges and text styles - roster fixture, smoke tests, OpenAPI, TS types, dist, READMEs, docs
This commit is contained in:
@@ -564,7 +564,10 @@ func (s CRUDService) save(ctx context.Context, cc *CompiledController, id any, i
|
||||
return err
|
||||
}
|
||||
if update {
|
||||
err = tx.Save(target).Error
|
||||
// The row write uses the scope the load used: a soft-deleted
|
||||
// record the controller's FormExtendQuery includes (Winter's
|
||||
// withTrashed) is updated in place and stays soft-deleted.
|
||||
err = tx.Unscoped().Save(target).Error
|
||||
} else {
|
||||
err = tx.Create(target).Error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user