primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.58k stars 1.23k forks source link

StepPanel: activateCallback slot prop is causing TypeScript error in @primevue/nuxt-module version 4.0.4 #6210

Closed BenJackGill closed 2 months ago

BenJackGill commented 3 months ago

Describe the bug

After upgrading primevue, @primevue/themes, and @primevue/nuxt-module to version 4.0.4 I am getting this TypeScript error on the StepPanel activateCallback slot prop:

Expected 0 arguments, but got 1.

This error is wrong because we need to be able to pass a string or a number to activateCallback so that we can navigate to that step.

The only way to solve the errors I am seeing in the IDE are to add this:

import Step from "primevue/step";
import StepList from "primevue/steplist";
import StepPanel from "primevue/steppanel";
import StepPanels from "primevue/steppanels";
import Stepper from "primevue/stepper";

But that should not be needed because PrimeVue Nuxt is supposed to auto import all the components.

I tried my best to recreate the error in Stackblitz, although I think it can only be seen in local. The live reproduction added here is using PrimeVue Nuxt with a direct copy of the Stepper template example in the docs. It tries to pass in a number to activateCallback as shown by the docs. As described above it seems to be working in Stackblitz but it does not work on my local version.

Reproducer

https://stackblitz.com/edit/nuxt-starter-v2zujz?file=app.vue

PrimeVue version

4.0.4

Vue version

4.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

github-actions[bot] commented 2 months ago

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.

kadeem-lewis commented 2 months ago

I am experiencing the same issue but I am not using nuxt I am just using primevue v4.0.4 and @primevue/themes with vanilla vue.

I get the same error that it received 1 argument but expected zero. If I don't provide a value it doesn't work

When I tried to view the function in vscode, this is what was there

        /**
         * Click function.
         */
        activateCallback: () => void;
tugcekucukoglu commented 2 months ago

Related https://github.com/primefaces/primevue/issues/6225