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: tableClass prop specifies String type, though Array also works #5297

Closed
helenezspeer opened this issue Feb 16, 2024 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@helenezspeer
Copy link

Describe the bug

The tableClass prop erroneously specifies String type. Array types appear to also work. When passing an array, the console logs a warning. Adding the Array type to the prop would eliminate this unnecessary warning.

Reproducer

https://stackblitz.com/edit/primevue-create-vue-issue-template-gip7xj?file=src%2FApp.vue

PrimeVue version

3.48.1

Vue version

3.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. View reproducer.
  2. Open preview in new tab/window.
  3. Display developer console.

The styles display as specified in the two classes in the tableClass array. The console displays this warning:

App.vue?t=1708098753981:52 [Vue warn]: Invalid prop: type check failed for prop "tableClass". Expected String with value "class1,class2", got Array  
  at <DataTable value= (2) [{…}, {…}] tableClass= (2) ['class1', 'class2'] > 
  at <App>

Expected behavior

The styles should continue to display as specified in the two classes in the tableClass array.
The console should not display a warning.

@helenezspeer helenezspeer 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 16, 2024
@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 19, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.49.0 milestone Feb 19, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Feb 19, 2024
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

No branches or pull requests

2 participants