Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING Typed NaturalAbstractDetail.data #9819 #242

Merged
merged 1 commit into from
Aug 23, 2023
Merged

Conversation

PowerKiKi
Copy link
Member

NaturalAbstractDetail.data is implicitly typed with the result of service.resolve(). If needed that type can be widened by specifying a type for extra properties in the generic, like so:

class MyComponent extends NaturalAbstractDetail<MyService, {myProp: string}> {
}

getConsolidatedForClient() was dropped entirely without a replacement.
It should never be used in our projects (and it was not).

getDefaultForClient() was renamed into getFormExtraFieldDefaultValues() to better reflect its usage. It should never be called in projects, only within Natural itself. Projects were updated to instead call getDefaultForServer().

The overall behavior of both NaturalAbstractModelService and NaturalAbstractDetail is intact.

`NaturalAbstractDetail.data` is implicitly typed with the result of
`service.resolve()`. If needed that type can be widened by specifying
a type for extra properties in the generic, like so:

```ts
class MyComponent extends NaturalAbstractDetail<MyService, {myProp: string}> {
}
```

`getConsolidatedForClient()` was dropped entirely without a replacement.
 It should never be used in our projects (and it was not).

`getDefaultForClient()` was renamed into `getFormExtraFieldDefaultValues()`
to better reflect its usage. It should never be called in projects, only
within Natural itself. Projects were updated to instead call
`getDefaultForServer()`.

The overall behavior of both `NaturalAbstractModelService` and
`NaturalAbstractDetail` is intact.
@PowerKiKi PowerKiKi merged commit d90298c into master Aug 23, 2023
@PowerKiKi PowerKiKi deleted the issue-9819 branch October 29, 2023 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant