Skip to content

Splitter shows wrong logic for percentage case #9276

@Congchuabongbong

Description

@Congchuabongbong

Reproduction link

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

Steps to reproduce

What is expected?

What is actually happening?

When using the Splitter, I set the default sizes for the panels to 40% and 60%. When I shrink the panel container and start dragging to resize the panels, then expand the container again, the proportions become incorrect. This happens because the dragging logic sets the panel sizes in pixels, so when the container is resized, it doesn’t recalculate based on the proportional logic.

Environment Info
ng-zorro-antd 20.0.0
Browser

I think it would be better to support only one of the two modes: either pixels (px) or percentages (%), without mixing both.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions