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: rowStyle invalid Type: Got function expected object #5349

Closed
cuberinooo opened this issue Feb 28, 2024 · 0 comments
Closed

DataTable: rowStyle invalid Type: Got function expected object #5349

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

Comments

@cuberinooo
Copy link

Describe the bug

I saw that these changes were made on the latest minor update: components/lib/datatable/BaseDataTable.vue (see Screenshot)
Screenshot from 2024-02-28 16-15-53

Reading the docs it was clear that a function should be given. And the function should return an object.

Screenshot from the docs:
Screenshot from 2024-02-28 16-16-23

We used it like that:
:rowStyle="() => { return { 'height': someValue}}"

Here is the warning:
Screenshot from 2024-02-28 16-24-15

Now if we change it to

:rowStyle="{'height': someValue}"

We get the following error:

Screenshot from 2024-02-28 16-24-55

Reproducer

PrimeVue version

3.49.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@cuberinooo cuberinooo 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 28, 2024
@cuberinooo cuberinooo changed the title Component Name: DataTable rowStyle invalid Type: Got function expected object DataTable: rowStyle invalid Type: Got function expected object Feb 29, 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 Mar 14, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.50.0 milestone Mar 14, 2024
tugcekucukoglu added a commit that referenced this issue Mar 14, 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