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

inputNumber class prop type defect #1661

Closed
MichaelVonB opened this issue Oct 12, 2021 · 6 comments
Closed

inputNumber class prop type defect #1661

MichaelVonB opened this issue Oct 12, 2021 · 6 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@MichaelVonB
Copy link

[x ] bug report => Search github for a similar issue or PR before submitting

https://codesandbox.io/s/cocky-kilby-8w93d?file=/src/App.vue

Current behavior
In InputNumber.d.ts class is defined as a string

Screenshot (174)

Expected behavior
It should allow dynmic class binding

Please tell us about your environment:
OS: Windows,
VSCode, yarn, vite, vetur, vue-tsc

  • Vue version: 3.05

  • PrimeVue version: 3.7.1

@tugcekucukoglu
Copy link
Member

Thanks for the codesandbox sample. I tried your test case within a Vite project but I didn't get any error neither development nor production mode. Could you check it with the latest PrimeVue version?

@MichaelVonB
Copy link
Author

If I dont use "build": "vue-tsc --noEmit && vite build", as my build and just use "vite build" I dont get any errors. But vue-tsc applies type checking and in https://github.com/primefaces/primevue/blob/master/src/components/inputnumber/InputNumber.d.ts class is defined as a string. Hence the type checking vue-tsc provides throws an error

@tugcekucukoglu
Copy link
Member

Thanks for the explanation. Still didn't get the error. I have created a repo Could you check it please? What have I missed?

@MichaelVonB
Copy link
Author

Unfortunately I cant push to your repo. However I found the error. If you dont import InputNumber in main.ts and import it in the component directly the error occurs. I dont know if vue-tsc cant use typecheking if it is imported in main.ts or whats the reasonf for that.

@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 15, 2021
@tugcekucukoglu tugcekucukoglu added this to the 3.8.2 milestone Oct 15, 2021
@tugcekucukoglu tugcekucukoglu self-assigned this Oct 15, 2021
@tugcekucukoglu tugcekucukoglu changed the title inputText class inputNumber class prop type defect Oct 15, 2021
@tugcekucukoglu
Copy link
Member

Thanks for your help. It's fixed for the next version.

@Ariki
Copy link

Ariki commented Dec 18, 2021

It seems this bug has been reintroduced again in 3.10.
Also, the same in Checkbox and TriStateCheckbox (maybe in some other components too).

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

3 participants