Skip to content

ant-btn-icon-only works wrong with dynamic importing icons #7631

Open
@VitaliiLitkevichVL

Description

@VitaliiLitkevichVL

Reproduction link

https://stackblitz.com/edit/angular-ivy-8bqap7?file=angular.json,src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.css

Steps to reproduce

  1. add button with icon only
  2. check if is has class ant-btn-icon-only

What is expected?

button has ant-btn-icon-only class

What is actually happening?

button doesn't have ant-btn-icon-only class

Environment Info
ng-zorro-antd 14.0.0
Browser All

it checks if svg node exists
return node.nodeName === 'SPAN' && iconChildNodes.length > 0 && iconChildNodes.every(ic => ic.nodeName === 'svg');

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions