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

Horizontal Scroller in the Data Table with selection/checkbox resets to initial position on clicking anywhere in the Data Table Row #3158

Closed
indra-sen-morrisonsplc opened this issue Aug 13, 2022 · 1 comment · Fixed by #6131
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted

Comments

@indra-sen-morrisonsplc
Copy link

Describe the bug

Dealing with large numbers of columns in a Data Table, the Data Column can have a horizontal scroller along with a checkbox. While clicking anywhere in the DataTable component with a checkbox/selection, the horizontal scroller automatically resets to it's initial position when clicked anywhere on the row item. Ideally the click should not reset the scroller position.

CodePen Example : https://codesandbox.io/s/serene-nightingale-j3s1iy?file=/src/demo/DataTableSelectionDemo.js

Reproducer

https://codesandbox.io/s/serene-nightingale-j3s1iy?file=/src/demo/DataTableSelectionDemo.js

PrimeReact version

6.6.0

React version

18.x

Language

ES6

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Import a DataTable component with selection/checkbox.
  2. Make sure that it has enough columns to have a horizontal scroller
    3.Drag the horizontal scroller towards complete right to shift the initial content a little bit.
    4.Now click anywhere on the row, the horizontal scroller will automatically reset to initial position.

Expected behavior

The scroller should not reset it's position as the user might be willing to edit a certain cell. The scroller must stay at it's position.

@indra-sen-morrisonsplc indra-sen-morrisonsplc added Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component. labels Aug 13, 2022
@indra-sen-morrisonsplc indra-sen-morrisonsplc changed the title Component: TitlHorizontal Scroller in the Data Table with selection/checkbox resets to initial position on clicking anywhere in the Data Table Row Horizontal Scroller in the Data Table with selection/checkbox resets to initial position on clicking anywhere in the Data Table Row Aug 13, 2022
@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Type: Bug Issue contains a defect related to a specific component. Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 13, 2022
@melloware
Copy link
Member

Duplicate of #3155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants