fix: restore partial typing for all NgxDatatableConfig fields - #813
Merged
Conversation
spike-rabbit
force-pushed
the
fix/optional-datatable-config
branch
from
August 20, 2026 07:31
f050c0f to
31a7d5b
Compare
spike-rabbit
force-pushed
the
fix/optional-datatable-config
branch
from
August 20, 2026 07:34
31a7d5b to
2675fc4
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the ngx-datatable global configuration typing so consumers can provide partial NgxDatatableConfig objects directly (including nested messages and cssClasses overrides), while keeping the internally resolved configuration fully populated via defaults.
Changes:
- Made
NgxDatatableConfig,NgxDatatableMessages, andNgxDatatableCssClassesfields optional to support partial configuration natively. - Removed the redundant
AllPartialwrapper usage across module/provider/testing code paths. - Typed the internally computed
DatatableConfiguration.configurationas fully required after defaults are applied.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| projects/ngx-datatable/src/testing/datatable-configuration.mock.ts | Removes AllPartial from mock override types to align with the new partial NgxDatatableConfig. |
| projects/ngx-datatable/src/lib/ngx-datatable.module.ts | Updates forRoot signature to accept NgxDatatableConfig directly (no AllPartial). |
| projects/ngx-datatable/src/lib/ngx-datatable.config.ts | Makes config/message/css-class fields optional and removes AllPartial + token typing reliance on it. |
| projects/ngx-datatable/src/lib/components/datatable.component.ts | Adjusts injected global configuration typing to NgxDatatableConfig and removes AllPartial. |
| projects/ngx-datatable/src/lib/components/datatable-configuration.ts | Introduces a deep-required type for the resolved configuration signal after defaults/overrides are applied. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
spike-rabbit
force-pushed
the
fix/optional-datatable-config
branch
from
August 21, 2026 07:36
2675fc4 to
bed8d4b
Compare
fh1ch
approved these changes
Aug 25, 2026
fh1ch
left a comment
Member
There was a problem hiding this comment.
@spike-rabbit all good, thanks a bunch 🙇
LGTM 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
NgxDatatableConfigrequires every top-level and nested field. Partial configuration is supported only through the separateAllPartialwrapper used by providers and internal consumers.What is the new behavior?
NgxDatatableConfigitself is partial, including nested message and CSS-class overrides. RedundantAllPartialwrappers are removed, while the internally resolved configuration remains fully required after defaults are applied.Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: N/A
Other information: