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

DataGrid: Invalid typing of slot props #3395

Closed
Magiczne opened this issue Dec 13, 2022 · 5 comments · Fixed by #3423
Closed

DataGrid: Invalid typing of slot props #3395

Magiczne opened this issue Dec 13, 2022 · 5 comments · Fixed by #3423
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Magiczne
Copy link
Contributor

Magiczne commented Dec 13, 2022

Describe the bug

When using scoped slots for column header/footer in data grid, typescript will complain for typings of the slot props.
For example

<column>
  <template #footer="{ column }">
     {{ column.props.field }}
  </template>
</column>

TS Will complain:
error TS2551: Property 'props' does not exist on type 'Column'. Did you mean '$props'?

In the templates the $ is removed, so the typings should be updated

Reproducer

https://codesandbox.io/s/vite-primevue-forked-7rl78b?file=/src/App.vue

Happen when using vite + vite-tsc

import vuePlugin from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import checkerPlugin from 'vite-plugin-checker'

export default defineConfig({
  plugins: [checkerPlugin({ vueTsc: true }), vuePlugin()]
})

Would probably appear in the VS Code using Volar extension

PrimeVue version

3.20

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@Magiczne Magiczne added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 13, 2022
@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 14, 2022
@github-actions
Copy link

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

@Magiczne
Copy link
Contributor Author

Will prepare reproduction today/tommorrow

@Magiczne
Copy link
Contributor Author

@tugcekucukoglu - I've added reproduction codesandbox.

volvachev added a commit to volvachev/primevue that referenced this issue Dec 18, 2022
volvachev added a commit to volvachev/primevue that referenced this issue Dec 19, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Jan 9, 2023
@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Jan 9, 2023
@tugcekucukoglu
Copy link
Member

How can we replicate the problem? The link is broken.

@Magiczne
Copy link
Contributor Author

Magiczne commented Apr 5, 2023

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Apr 5, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.27.0 milestone Apr 5, 2023
volvachev added a commit to volvachev/primevue that referenced this issue Apr 11, 2023
@tugcekucukoglu tugcekucukoglu modified the milestones: 3.27.0, 3.x Apr 19, 2023
@mertsincan mertsincan modified the milestones: 3.x, 3.35.1 Oct 5, 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
3 participants