Skip to content

Releases: NG-ZORRO/ng-zorro-antd

19.0.0

20 Dec 04:42
5ffa099
Compare
Choose a tag to compare

19.0.0

2024-12-20

Bug Fixes

  • autocomplete: remove inline style (CSP compliant) (#8875) (30c25f0)
  • avatar: calculate size at the right time (#8754) (3a5ba37)
  • card: remove nzBorderless input (#8741) (22ce17c)
  • carousel: carousel not working correctly in rtl mode (#8770) (0202a19)
  • cascader: correct menu display level (#8866) (5fec53e)
  • drawer: should clear previously focused element (#8893) (4498af0)
  • i18n: add missing translations to vi_VN (#8894) (f08ad1c)
  • tree-view: nzTreeNodePadding not works in virtual scroll (#8920) (82b660a)

Code Refactoring

  • cancel support for HTML string rendering (#8831) (5fae01a)
  • remove ngClass and ngStyle (#8895) (c3ab3ba)
  • image: remove deprecated FADE_CLASS_NAME_MAP and IMAGE_PREVIEW_MASK_CLASS_NAME (#8912) (65223d9)
  • transfer,tree,tree-select rename CheckBox to Checkbox (#8934) (c76433d5)

Features

  • cascader: support multiple selection (#8903) (e5dfb49)
  • cascader: support nzPlacement (#8935) (6fbd22c)
  • checkbox: redesign the checkbox group component (#8932) (489e0de)
  • divider: add nzVariant option (#8827) (2c63c87)
  • float-button: add float-button component (#7884) (dab4d66)
  • icon: support nz-icon tag selector (#8778) (1406241)
  • image: close image preview when escape key pressed (#8809) (d587615)
  • input: support one time password (OTP) (#8715) (cdbaf4d)
  • menu: add nzTriggerSubMenuAction to support click trigger for submenu (#8461) (860df87)
  • qrcode: add nzStatusRender to support customize state rendering (#8714) (6f36d75)
  • segmented: redesign the segmented component (#8753) (4dc866c)
  • space: add space compact component (#8755) (b9c511d)
  • table: add nzSortDirections to global config (#6613) (#8721) (eb1fdc5)
  • transfer: add nzOneWay to support one way style (#8717) (99fd4de)
  • input-number: redesign the input-number (#8901) (df55d88)
  • schematics: add v19 ng update migration (#8911) (1a20de2)

BREAKING CHANGES

  • All

    • nzClass / nzStyle input properties no longer support the following features:
      • Set(): use arrays instead
      • Keys which multiple styles/classes separated with keys: split a key with spaces into multiple keys
    • Cancel support for HTML string rendering
    • Migrate @WithConfig to standard decorator. If you're using @WithConfig in your library, please turn experimentalDecorators off in tsconfig.json
    • Migrate [nz-icon] to nz-icon tag. If you're using [nz-icon] selector in stylesheet to select icon inside zorro component, please use nz-icon instead
  • input-number: Redesign the input-number so that it will be much simpler and more flexible.

    Now you can use affixes or addons as follows, no need for ng-template and nz-input-number-group:

    <!-- Custom handler icons -->
    <nz-input-number>
      <nz-icon nzInputNumberUpIcon />
      <nz-icon nzInputNumberDownIcon />
    </nz-input-number>
    
    <!-- With affixes -->
    <nz-input-number>
      <span nzInputPrefix>Prefix</span>
      <span nzInputSuffix>Suffix</span>
    </nz-input-number>
    
    <!-- With addons -->
    <nz-input-number>
      <span nzInputAddonBefore>Before</span>
      <span nzInputAddonAfter>After</span>
    </nz-input-number>

    The old input-number component is marked as deprecated, and its entrypoint had changed to ng-zorro-antd/input-number-legacy.
    NzInputNumberComponent is now NzInputNumberLegacyComponent, and NzInputNumberModule is now NzInputNumberLegacyModule.

    Don't worry, ng update ng-zorro-antd will automatically do the migration.

  • cascader: Cancel support for writing value with NzCascaderOption[] type.

    In the past, the cascader component kept a trick that if you wrote value with NzCascaderOption[] type, it extracted value by mapping each item to its value property, for example:

    @Component({
      template: `<nz-cascader [nzOptions]="options" [ngModel]="value"></nz-cascader>`
    })
    export class ExampleComponent {
      value = [{ label: 'NG ZORRO', value: 'ng-zorro-antd' }]
    }

    then the value of cascader would be 'ng-zorro-antd'.
    It's strange that the input and output values don't match when we haven't changed the values, and it's hard to maintain. We expect that the value passed in should be the value in the list of options.

    In v19, this trick is removed and if you're already using this trick in your code, please consider the add a map function to pass the actual value.

  • checkbox Redesign the checkbox group component.

    • Remove NzCheckBoxOptionInterface['checked] field. By the way, NzCheckBoxOptionInterface is marked as deprecated, use NzCheckboxOption instead
    • nz-checkbox-group: Type of ngModel is changed from NzCheckBoxOptionInterface[] to NzCheckboxOption['value'][]
  • card: Remove redundant nzBorderless input property. Use nzBordered instead.

  • image: Remove deprecated FADE_CLASS_NAME_MAP and IMAGE_PREVIEW_MASK_CLASS_NAME

  • pipes: Remove deprecated NzSafeNullPipe

  • segmented: Redesign the segmented component.

    • Value of ngModel is changed from index to option's value
    • Change emission type of nzValueChange from number to option's value type (string | number)
    • Remove nzLabelTemplate, use nz-segmented-item directive instead
  • space: Rename exportAs of NzSpaceComponent from NzSpace to standard nzSpace

  • transfer: Rename nzTreeCheckBoxChange to nzTreeCheckboxChange

  • tree,tree-select: Rename nzCheckBoxChange to `nzCheckboxCha...

Read more

19.0.0-beta.1

17 Dec 10:15
5ffa099
Compare
Choose a tag to compare
19.0.0-beta.1 Pre-release
Pre-release

Entire changelog of 19.0.0 can be seen here (English|中文)

19.0.0-beta.1

2024-12-17

Bug Fixes

  • cascader: abnormal width of search results (#8937) (c6aa501)
  • cascader: should change check state trigger ngModelChange (#8941) (2c7f49a)
  • input-number: skip first setDisabledState when use with ngModel (#8933) (8b24746)
  • input-number: value out of range when hold shift key (#8936) (a8efd2b)
  • select: multiple selection don't show search input (#8929) (ef4bbb1)
  • tree-view: nzTreeNodePadding not works in virtual scroll (#8920) (82b660a)

Features

BREAKING CHANGES

  • All Migrate [nz-icon] to nz-icon tag. If you're using [nz-icon] selector in stylesheet to select icon inside zorro component, please use nz-icon instead

  • checkbox Redesign the checkbox group component.

    • Remove NzCheckBoxOptionInterface['checked] field. By the way, NzCheckBoxOptionInterface is marked as deprecated, use NzCheckboxOption instead
    • nz-checkbox-group: Type of ngModel is changed from NzCheckBoxOptionInterface[] to NzCheckboxOption['value'][]
  • transfer: Rename nzTreeCheckBoxChange to nzTreeCheckboxChange

  • tree,tree-select: Rename nzCheckBoxChange to nzCheckboxChange

Deprecations

The following APIs are marked as deprecated in v19 and will be removed in the next major version.
Please refer to related documentation for better alternatives.

Module API
ng-zorro-antd/checkbox NzCheckboxWrapperComponent

19.0.0-beta.1

2024-12-17

Bug Fixes

  • cascader: 修复搜索下拉框宽度异常的问题 (#8937) (c6aa501)
  • cascader: 修复多选模式下 checkbox 状态改变时未触法 ngModelChange 的问题 (#8941) (2c7f49a)
  • input-number: 使用 ngModel 时跳过第一次 setDisabledState 调用 (#8933) (8b24746)
  • input-number: 修复按键改变值时值超出上下限的问题 (#8936) (a8efd2b)
  • select: 多选模式下输入框不展示的问题 (#8929) (ef4bbb1)
  • tree-view: 修复 nzTreeNodePadding 在虚拟滚动中不生效问题 (#8920) (82b660a)

Features

  • cascader: 支持 nzPlacement 自定义浮层弹出位置 (#8935) (6fbd22c)
  • checkbox: 重新设计 nz-checkbox-group 组件,支持自定义布局 (#8932) (489e0de)

BREAKING CHANGES

  • All 组件内部写法从 [nz-icon] 迁移到新的 nz-icon 标签。如果在 CSS 中使用了 [nz-icon] 选择器来选择组件内部的图标,请使用为 nz-icon 替代

  • checkbox Redesign the checkbox group component.

    • 移除 NzCheckBoxOptionInterface['checked] 字段,另外 NzCheckBoxOptionInterface 被标记为弃用,请使用 NzCheckboxOption 替代
    • nz-checkbox-group: ngModel 类型从 NzCheckBoxOptionInterface[] 改为选项值的类型 NzCheckboxOption['value'][]
  • transfer: 属性 nzTreeCheckBoxChange 重命名为 nzTreeCheckboxChange

  • tree,tree-select: 属性 nzCheckBoxChange 重命名为 nzCheckboxChange

Deprecations

在 v19 中,以下 API 被标记为 deprecated,并将在下一个主要版本中移除。 请参考相关文档以获取更好的替代方案。

Module API
ng-zorro-antd/checkbox NzCheckboxWrapperComponent

19.0.0-beta.0

06 Dec 07:19
1bfa359
Compare
Choose a tag to compare
19.0.0-beta.0 Pre-release
Pre-release

19.0.0

2024-12-06

Bug Fixes

  • autocomplete: remove inline style (CSP compliant) (#8875) (30c25f0)
  • avatar: calculate size at the right time (#8754) (3a5ba37)
  • card: remove nzBorderless input (#8741) (22ce17c)
  • carousel: carousel not working correctly in rtl mode (#8770) (0202a19)
  • cascader: correct menu display level (#8866) (5fec53e)
  • drawer: should clear previously focused element (#8893) (4498af0)
  • i18n: add missing translations to vi_VN (#8894) (f08ad1c)

Code Refactoring

  • cancel support for HTML string rendering (#8831) (5fae01a)
  • remove ngClass and ngStyle (#8895) (c3ab3ba)
  • image: remove deprecated FADE_CLASS_NAME_MAP and IMAGE_PREVIEW_MASK_CLASS_NAME (#8912) (65223d9)

Features

  • cascader: support multiple selection (#8903) (e5dfb49)
  • divider: add nzVariant option (#8827) (2c63c87)
  • float-button: add float-button component (#7884) (dab4d66)
  • icon: support nz-icon tag selector (#8778) (1406241)
  • image: close image preview when escape key pressed (#8809) (d587615)
  • input: support one time password (OTP) (#8715) (cdbaf4d)
  • menu: add nzTriggerSubMenuAction to support click trigger for submenu (#8461) (860df87)
  • qrcode: add nzStatusRender to support customize state rendering (#8714) (6f36d75)
  • segmented: redesign the segmented component (#8753) (4dc866c)
  • space: add space compact component (#8755) (b9c511d)
  • table: add nzSortDirections to global config (#6613) (#8721) (eb1fdc5)
  • transfer: add nzOneWay to support one way style (#8717) (99fd4de)
  • input-number: redesign the input-number (#8901) (df55d88)
  • schematics: add v19 ng update migration (#8911) (1a20de2)

BREAKING CHANGES

  • All

    • nzClass / nzStyle input properties no longer support the following features:
      • Set(): use arrays instead
      • Keys which multiple styles/classes separated with keys: split a key with spaces into multiple keys
    • Cancel support for HTML string rendering
    • Migrate @WithConfig to standard decorator. If you're using @WithConfig in your library, please turn experimentalDecorators off in tsconfig.json
  • input-number: Redesign the input-number so that it will be much simpler and more flexible.

    Now you can use affixes or addons as follows, no need for ng-template and nz-input-number-group:

    <!-- Custom handler icons -->
    <nz-input-number>
      <nz-icon nzInputNumberUpIcon />
      <nz-icon nzInputNumberDownIcon />
    </nz-input-number>
    
    <!-- With affixes -->
    <nz-input-number>
      <span nzInputPrefix>Prefix</span>
      <span nzInputSuffix>Suffix</span>
    </nz-input-number>
    
    <!-- With addons -->
    <nz-input-number>
      <span nzInputAddonBefore>Before</span>
      <span nzInputAddonAfter>After</span>
    </nz-input-number>

    The old input-number component is marked as deprecated, and its entrypoint had changed to ng-zorro-antd/input-number-legacy.
    NzInputNumberComponent is now NzInputNumberLegacyComponent, and NzInputNumberModule is now NzInputNumberLegacyModule.

    Don't worry, ng update ng-zorro-antd will automatically do the migration.

  • cascader: Cancel support for writing value with NzCascaderOption[] type.

    In the past, the cascader component kept a trick that if you wrote value with NzCascaderOption[] type, it extracted value by mapping each item to its value property, for example:

    @Component({
      template: `<nz-cascader [nzOptions]="options" [ngModel]="value"></nz-cascader>`
    })
    export class ExampleComponent {
      value = [{ label: 'NG ZORRO', value: 'ng-zorro-antd' }]
    }

    then the value of cascader would be 'ng-zorro-antd'.
    It's strange that the input and output values don't match when we haven't changed the values, and it's hard to maintain. We expect that the value passed in should be the value in the list of options.

    In v19, this trick is removed and if you're already using this trick in your code, please consider the add a map function to pass the actual value.

  • card: Remove redundant nzBorderless input property. Use nzBordered instead.

  • image: Remove deprecated FADE_CLASS_NAME_MAP and IMAGE_PREVIEW_MASK_CLASS_NAME

  • pipes: Remove deprecated NzSafeNullPipe

  • segmented: Redesign the segmented component.

    • Value of ngModel is changed from index to option's value
    • Change emission type of nzValueChange from number to option's value type (string | number)
    • Remove nzLabelTemplate, use nz-segmented-item directive instead
  • space: Rename exportAs of NzSpaceComponent from NzSpace to standard nzSpace

Deprecations

The following APIs are marked as deprecated in v19 and will be removed in the next major version.
Please refer to related documentation for better alternatives.

Module API
ng-zorro-antd/button NzButtonGroupComponent
ng-zorro-antd/core/form NzFormPatchModule
ng-zorro-antd/input NzInputGroupComponent#nzCompact
ng-zorro-antd/input-number-legacy *
ng-zorro-antd/message NzMessageModule
ng-zorro-antd/notification NzNotificationModule
NzNotificationServiceModule

19.0.0

2024-12-06

Bug Fixes

Read more

18.2.1

18 Nov 03:14
23eab98
Compare
Choose a tag to compare

18.2.1

2024-11-15

Bug Fixes

  • anchor: fix a tag problem with null or undefined value if TemplateRef provided (#8864) (41f6609)
  • color-picker: remove inline style (CSP compliant) (#8874) (0264da9)
  • image: remove inline style (CSP compliant) (#8876) (63c8953)
  • qrcode: remove event listeners once settled (#8861) (40d466d)
  • select: remove inline style (CSP compliant) (#8873) (9431d0d)
  • transfer: cancel selecting all should emit nzSelectChange event (#8872) (5ff9821)
  • watermark: cleanup event listeners once settled (#8862) (decd477)

18.2.1

2024-11-15

Bug Fixes

  • anchor: 修复 nzTitle 使用 TemplateRef 时 a 标签 title 内容异常 (#8864) (41f6609)
  • color-picker: 修复 CSP 问题 (#8874) (0264da9)
  • image: 修复 CSP 问题 (#8876) (63c8953)
  • select: 修复 CSP 问题 (#8873) (9431d0d)
  • transfer: 修复取消全选未触发 nzSelectChange 事件 (#8872) (5ff9821)
  • qrcode: 加载稳定后移除事件监听器 (#8861) (40d466d)
  • watermark: 加载稳定后移除事件监听器 (#8862) (decd477)

18.2.0

08 Nov 04:05
c5478f6
Compare
Choose a tag to compare

18.2.0

2024-11-07

Bug Fixes

  • i18n: add missing translations to nb_NO (#8712) (8c9bcd1)
  • i18n: add missing translations to hu_HU (#8769) (9e21ae8)
  • badge: NG0955 warning in nz-badge-sup component (#8858) (cc52555)
  • select: multiple select cause switch size flash when init (#8851) (d28876c)
  • carousel: correctly switch slides in rtl mode (#8705) (85f23a1)
  • drawer: emit nzVisibleChange when close on navigation (#8850) (29827df)
  • modal,drawer: secondary overlays not scrolling inside (#8804) (ed7951d)
  • modal: remove dark backdrop when nzMask is false (#8798) (f2f04fe)
  • transfer: correctly set transfer button disable state (#8824) (195ad26)

Features

  • datepicker: send event emitter when panel mode change (#8685) (6462a47)
  • tabs: support destroyInactiveTabPane (#8845) (0de6d62)

18.2.0

2024-11-07

Bug Fixes

  • i18n: 添加国际化文案 nb_NO (#8712) (8c9bcd1)
  • i18n: 添加国际化文案 hu_HU (#8769) (9e21ae8)
  • badge: 修复组件中的 NG0955 警告 (#8858) (cc52555)
  • select: 修复多选模式下和 switch 一起使用时,引发初始化时 switch 组件大小闪烁 (#8851) (d28876c)
  • carousel: 修复 rtl 模式下轮播图切换异常 (#8705) (85f23a1)
  • drawer: 导航关闭时发射 nzVisibleChange 事件 (#8850) (29827df)
  • modal,drawer: 修复弹出容器中滚动异常 (#8804) (ed7951d)
  • modal: 修复 nzMaskfalse 时遮罩被渲染 (#8798) (f2f04fe)
  • transfer: 正确更新穿梭按钮的禁用状态 (#8824) (195ad26)

Features

  • datepicker: 新增改变模式或日期的回调 nzOnPanelChange (#8685) (6462a47)
  • tabs: 新增 destroyInactiveTabPane 支持销毁非活动状态的 tab (#8845) (0de6d62)

18.1.1

21 Aug 06:43
175f47b
Compare
Choose a tag to compare

18.1.1

2024-08-20

Bug Fixes


18.1.1

2024-08-20

Bug Fixes

18.1.0

26 Jul 08:01
1b805bb
Compare
Choose a tag to compare

18.1.0

2024-07-25

Bug Fixes

  • cascader: hide placeholder when trigger compositionstart event (#8641) (17b0ea3)
  • i18n: add missing translations to pt_BR (#7790) (6fc1c78)
  • i18n: add scanned field to QRCode for fr_BE, fr_CA, fr_FR and lv_LV (#8614) (9b69410)
  • schematics: import missing RouterLink in template (#8621) (032a0c2)
  • transfer: disabling selection does not affect selecting all (#8633) (75d8c7b)

Features


18.1.0

2024-07-25

Bug Fixes

  • cascader: compositionstart 事件触发时隐藏 placeholder (#8641) (17b0ea3)
  • i18n: 更新 pt_BR 国际化文案 (#7790) (6fc1c78)
  • i18n: 更新 fr_BE, fr_CA, fr_FR, lv_LV 国际化文案 (#8614) (9b69410)
  • schematics: 修复模板中 RouterLink 引入缺失问题 (#8621) (032a0c2)
  • transfer: 修复选项全部禁用后全选按钮仍可点击 (#8633) (75d8c7b)

Features

  • breadcrumb: 新增 nzRouteFn 以格式化面包屑路由 (#6313) (6d805c4)
  • i18n: 添加国际化文案 en_AU (#7919) (c4e6c8d)
  • icon: 新增 provideNzIconsprovideNzIconsPatch API (#8650) (b22672d)
  • popconfirm: 新增支持 nzPopconfirmTitleContext 上下文 (#7989) (6d27073)
  • table: 新增支持 nzSummary 总结栏 (#8639) (20bb5b2)
  • table: 总结栏支持 nzFixed 固定 (#8642) (bef12e6)
  • tree-select: nzNotFoundContent 支持 TemplateRef 类型 (#8638) (13e8a45)

18.0.1

28 Jun 02:29
893b180
Compare
Choose a tag to compare

18.0.1

2024-06-27

Bug Fixes


18.0.1

2024-06-27

Bug Fixes

18.0.0

19 Jun 02:08
1f137a3
Compare
Choose a tag to compare

18.0.0

2024-06-06

⚠ BREAKING CHANGES

  • collapse: change nzExpandIconPosition type from left | right to start | end (#8561) (3ad5674)
  • no longer use inline JavaScript in Less (#8552) (7e873c8)

No need to wrap Less functions provided by antd (including colorEasing, colorPalette, tinycolor) with ~`` anymore.

- color(~`colorPalette('@{primary-color}', 5)`)
+ color(colorPalette('@{primary-color}', 5))

Bug Fixes

  • cascader,select,time-picker,tooltip,tree-select: take in account shadow dom when getting the target of an event (#7853) (843b703)
  • tooltip: fix arrow color when custom color (#8555) (92c586b)
  • upload: prevent drop event for firefox only (#8551) (c6e7bd7)
  • rate: half value when allow half is false (#8536) (7742fe3)

Features


18.0.0

2024-06-06

⚠ BREAKING CHANGES

  • collapse: nzExpandIconPosition 类型从 left | right 变更为 start | end (#8561) (3ad5674)
  • Less 中不再使用 inline JavaScript (#8552) (7e873c8)

使用 antd 提供的 Less 函数时不再需要用 ~`` 包裹,例如:

- color(~`colorPalette('@{primary-color}', 5)`)
+ color(colorPalette('@{primary-color}', 5))

受影响的函数包括:colorEasingcolorPalettetinycolor

Bug Fixes

  • cascader,select,time-picker,tooltip,tree-select: 修复在 shadow DOM 中获取 EventTarget 异常问题 (#7853) (843b703)
  • tooltip: 修复箭头颜色未被自定义颜色覆盖问题 (#8555) (92c586b)
  • upload: 仅在 firefox 浏览器中阻止拖拽事件 (#8551) (c6e7bd7)
  • rate: 修复 nzAllowHalffalse 时展示半星 (#8536) (7742fe3)

Features

17.4.1

24 May 09:34
a2a4330
Compare
Choose a tag to compare

17.4.1

2024-05-24

Bug Fixes

  • card: use skeleton instead to card-loading-content (#8528) (a36ebd3)
  • color-picker: avoid emitted twice nzOnChange event (#8530) (5dea059)
  • list: static query list-item-action template (#8527) (85301e0)
  • popconfirm: fix message icon style (#8511) (4f1f9bb)
  • tooltip,popover,popconfirm: fix hydration error (#8512) (5009ec0)

Features

  • popconfirm: popconfirm support for nzOkDisabled (#8542) (8c247db)

Performance Improvements

  • back-top: remove the redundant changeDetectorRef (c1e39e7)
  • qr-code: improved background drawing efficiency (#8543) (db09bf7)

17.4.1

2024-05-24

Bug Fixes

  • card: 使用 skeleton 代替 card-loading-content (#8528) (a36ebd3)
  • color-picker: 避免两次 nzOnChange 事件 (#8530) (5dea059)
  • list: 静态查询列表项操作模板 (#8527) (85301e0)
  • popconfirm: icon 样式丢失 (#8511) (4f1f9bb)
  • tooltip,popover,popconfirm: SSR 引入的异常 (#8512) (5009ec0)

Features

  • popconfirm: popconfirm 确认按钮支持禁用 (#8542) (8c247db)

Performance Improvements

  • back-top: 删除多余的 changeDetectorRef (c1e39e7)
  • qr-code: 提高背景绘制效率 (#8543) (db09bf7)