NG-ZORRO/ng-zorro-antd

nzTreeNodePadding does not work in tree-view component

Closed this issue · 10 comments

Reproduction link

https://stackblitz.com/edit/angular-l8dlqv?file=src%2Fapp%2Fapp.component.ts

Steps to reproduce

Using nzTreeNodePadding, expand the parent to find that the child is aligned with the parent, with no padding-left in the style

What is expected?

Using nzTreeNodePadding, children are indented after the parent level is expanded

What is actually happening?

With nzTreeNodePadding, children are not indented after the parent level is expanded

Environment Info
ng-zorro-antd 17.2.0
Browser Chrome 122.0.6261.112

Hi @xia930425
Your reproduction link is broken, can you provide another one?

Hi @xia930425 Your reproduction link is broken, can you provide another one?

Link has been updated https://stackblitz.com/edit/angular-l8dlqv?file=src%2Fapp%2Fapp.component.ts

The bug makes nz-tree-view unusable. Can this be prioritized, please?

Actually, it looks like it's fixed in the latest 17.3.0 https://stackblitz.com/run?file=src%2Fapp%2Fapp.component.ts

Actually, it looks like it's fixed in the latest 17.3.0 https://stackblitz.com/run?file=src%2Fapp%2Fapp.component.ts

@xia930425
Could you confirm that upgrading to version 17.3.0 fixes your problem or not?

I checked the Op's stackblitz, but I could'nt generate the same bug on my local machine.
This is the sample repo I made for this bug(link), as you can see the Tree component is working fine.

I got some errors while trying to serve the original post's stackblitz, for example there are some dependencies that are for angular version 11, and there is no serve command configured in the angular.json file, so I can not really debug the OP's example on my local machine and copying the provided code into another angular project works fine for me; if anyone reading this message has the same problem, please provide a buildable sample and link it in the comment section 🙏

@ParsaArvanehPA, I believe the reason you can't reproduce it in your sample repo is because you are using 17.3.0. I only observed this bug in 17.2.0. https://github.com/ParsaArvanehPA/tree-view-sample/blob/9af0bf4ed310b372139048cca086ddeafdaf18e4/package.json#L22

@ParsaArvanehPA ,No abnormalities were found after upgrading to version 17.3.0. After multiple tests, it was confirmed that the abnormalities only appeared in version 17.2.0.

@ParsaArvanehPA ,No abnormalities were found after upgrading to version 17.3.0. After multiple tests, it was confirmed that the abnormalities only appeared in version 17.2.0.

Thank you guys for checking this out; sorry I got a little busy and could'nt be that much of a help.
Considering this fact, this issue can be closed.