question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nzGutter Type in GridConfig in NzConfig appears to be incorrect

See original GitHub issue

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-js3xtj?file=src/app/app.module.ts

Steps to reproduce

Set Grid’s nzGutter property in Global Config with object as defined in documentation here e.g.

grid: { nzGutter: { xs: 8, sm: 16, md: 24, lg: 32, xl: 32, xxl: 32 } }

results in

Type '{ xs: number; sm: number; md: number; lg: number; xl: number; xxl: number; }' is not assignable to type 'number | BreakpointMap'.

However type should likely be

{ [key in NzBreakpoint]?: number;  } | number;

What is expected?

Type that is specified in documentation to be accepted as correct when setting global config for Grid Gutter

What is actually happening?

Typings are incorrect and wrong type is expected for Grid Gutter global config.

Environment Info
ng-zorro-antd 8.5.2
Browser Chrome Version 80.0.3987.132

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
vthinkxiecommented, Mar 27, 2020

cc @wendellhu95 it seems that the nzGutter is not supported in the globalconfig yet.

0reactions
vthinkxiecommented, Sep 15, 2020

Hi @cparkinsonMYCM we are going to close this issue now, thanks for your reporting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng-zorro-antd - UNPKG
isTemplate = false;\n }\n }\n\n recreateView(): void {\n if (!this. ... types/common-wrap';\n\nexport function toBoolean(value: boolean | string): boolean ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found