Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable in expand mode resizing problem #4277

Closed
1Map opened this issue Aug 16, 2023 · 4 comments · Fixed by #4276
Closed

DataTable in expand mode resizing problem #4277

1Map opened this issue Aug 16, 2023 · 4 comments · Fixed by #4276
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@1Map
Copy link
Contributor

1Map commented Aug 16, 2023

Describe the bug

Steps to reproduce the behavior
go to https://primevue.org/datatable/#resize_expandmode
go to the section labelled 'Expand Mode'
Use your mouse to drag the right side of the 'Name' column an inch to the right
Actual: The Code column and also the other columns after Name also changes size slightly. Not by as much as you resize the Name column, but it always changes, and it changes more if you resize Name more. This also happens for any other column aside from the first one. The end result is the column doesn't end up where you dragged it.

This only seems to be a problem with Expand Mode -- Fit mode works correctly.

Expected behavior
Name column resized to the exact spot where you dragged it, all other columns to the right shifted by that amount but not resized, all other columns to the left untouched.

Reproducer

N/A

PrimeVue version

3.32.0

Vue version

3.x

Language

ALL

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

go to https://primevue.org/datatable/#resize_expandmode
go to the section labelled 'Expand Mode'
Use your mouse to drag the right side of the 'Name' column an inch to the right
Actual: The Code column and also the other columns after Name also changes size slightly. Not by as much as you resize the Name column, but it always changes, and it changes more if you resize Name more. This also happens for any other column aside from the first one. The end result is the column doesn't end up where you dragged it.

Expected behavior

Name column resized to the exact spot where you dragged it, all other columns to the right shifted by that amount but not resized, all other columns to the left untouched.

@1Map 1Map added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 16, 2023
@1Map
Copy link
Contributor Author

1Map commented Aug 16, 2023

Just did a PR (#4276) and awaiting review

@tugcekucukoglu
Copy link
Member

tugcekucukoglu commented Aug 17, 2023

It seems this issue and pr coming from PrimeReact: primefaces/primereact#3971

The bug is quite clear on PrimeReact. But from PrimeVue side can not replicate the issue. Please check that screen record and positions of the cursor and gridlines when dragging end.

Screen.Recording.2023-08-17.at.12.12.00.mov

@tugcekucukoglu tugcekucukoglu self-assigned this Aug 17, 2023
@1Map
Copy link
Contributor Author

1Map commented Aug 17, 2023

@tugcekucukoglu Your screen recording is showing the bug. The moment you make the "Name Column" wider, then all columns to the left of the column that were made wider, behaves wrong. In your case, "Code Column" also gets bigger (marginal). It is not suppose to behave like that. Only the column that you make wider is suppose to change, not other columns left of it.

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 17, 2023
@1Map
Copy link
Contributor Author

1Map commented Aug 17, 2023

@tugcekucukoglu On my side it works 100% with that bug fix.

https://github.com/primefaces/primevue/pull/4276/files

But, by looking at the master branch I can see that it is not yet implimented:

this.resizeTableCells(newColumnWidth);

@tugcekucukoglu tugcekucukoglu added this to the 3.32.1 milestone Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants