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: Colspan not working correctly when selectionMode='single' in Column #7222

Closed
4 tasks
YunKul-Lee opened this issue Feb 7, 2025 · 0 comments
Closed
4 tasks
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@YunKul-Lee
Copy link

Describe the bug

DataTable: Colspan not working correctly when selectionMode='single' in Column

When setting row selection with radio buttons in the DataTable, there is an issue where an extra colspan value is applied when the data is empty.

<DataTable> <Column selectionMode="single"> </DataTable>

It appears to be an issue with the columnsLength function in the BodyRow component.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/primevue-4-vite-datatable-issue?file=package.json

Environment

  • Chrome : 133.0.6943.53
  • PrimeVue : 4.2.5

Vue version

3.5.13

PrimeVue version

4.2.5

Node version

No response

Browser(s)

Chrome 133

Steps to reproduce the behavior

  1. Go to https://stackblitz.com/edit/primevue-4-vite-datatable-issue?file=package.json
  2. Open Chrome DevTools
  3. Select 'No Data found.' rows
  4. The table header has 5 columns, but the data section has colspan='6' applied.

Expected behavior

The colspan should be applied to match the number of columns in the table header.

@YunKul-Lee YunKul-Lee added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 7, 2025
@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 Feb 10, 2025
@tugcekucukoglu tugcekucukoglu added this to the 4.3.0 milestone Feb 10, 2025
@tugcekucukoglu tugcekucukoglu self-assigned this Feb 10, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Feb 10, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Feb 10, 2025
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
Status: Done
Development

No branches or pull requests

2 participants