Skip to content

fix: restore partial typing for all NgxDatatableConfig fields - #813

Merged
fh1ch merged 1 commit into
mainfrom
fix/optional-datatable-config
Aug 25, 2026
Merged

fix: restore partial typing for all NgxDatatableConfig fields#813
fh1ch merged 1 commit into
mainfrom
fix/optional-datatable-config

Conversation

@spike-rabbit

@spike-rabbit spike-rabbit commented Aug 20, 2026

Copy link
Copy Markdown
Member

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)

NgxDatatableConfig requires every top-level and nested field. Partial configuration is supported only through the separate AllPartial wrapper used by providers and internal consumers.

What is the new behavior?

NgxDatatableConfig itself is partial, including nested message and CSS-class overrides. Redundant AllPartial wrappers 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")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: N/A

Other information:

@spike-rabbit
spike-rabbit requested a review from a team as a code owner August 20, 2026 07:28
@spike-rabbit
spike-rabbit force-pushed the fix/optional-datatable-config branch from f050c0f to 31a7d5b Compare August 20, 2026 07:31
@spike-rabbit spike-rabbit changed the title fix: allow partial datatable configuration fix: make datatable configuration optional Aug 20, 2026
@spike-rabbit
spike-rabbit force-pushed the fix/optional-datatable-config branch from 31a7d5b to 2675fc4 Compare August 20, 2026 07:34
@spike-rabbit spike-rabbit changed the title fix: make datatable configuration optional fix: restore partial typing for all NgxDatatableConfig fields Aug 20, 2026
@fh1ch
fh1ch requested a lite review from Copilot August 21, 2026 06:24
@fh1ch fh1ch added the bug Something isn't working label Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and NgxDatatableCssClasses fields optional to support partial configuration natively.
  • Removed the redundant AllPartial wrapper usage across module/provider/testing code paths.
  • Typed the internally computed DatatableConfiguration.configuration as 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.

Comment thread projects/ngx-datatable/src/lib/ngx-datatable.module.ts
@spike-rabbit
spike-rabbit force-pushed the fix/optional-datatable-config branch from 2675fc4 to bed8d4b Compare August 21, 2026 07:36

@fh1ch fh1ch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spike-rabbit all good, thanks a bunch 🙇

LGTM 👍

@fh1ch
fh1ch added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit 8f82f90 Aug 25, 2026
9 checks passed
@fh1ch
fh1ch deleted the fix/optional-datatable-config branch August 25, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants