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: Typescript type definition for 'incrementButtonIcon' and 'decrementButtonIcon' errorneous #5132

Closed
mr-brandt opened this issue Oct 21, 2023 · 1 comment · Fixed by #5134
Assignees
Labels
Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@mr-brandt
Copy link

Describe the bug

Using Typescript I cannot use the attributes "incrementButtonIcon" and "decrementButtonIcon" anmore with string content as I get the error message 'The type "string" cannot be assigned to the type "InputNumberPassThroughType<HTMLAttributes>"'.

Reproducer

https://codesandbox.io/s/primereact-test-forked-nxhr7m?file=/src/index.tsx:1842-1866

PrimeReact version

10.0.5

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

Edge (macOS), Chrome (macOS)

Steps to reproduce the behavior

Use the value "pi pi-plus" as value for the attribute "incrementButtonIcon" or "decrementButtonIcon" on InputNumber in a tsx file.

Expected behavior

I expect that the icons specified in the value string for the attributes are used as written in the documentation (or maybe the documentation needs adjustment).

@mr-brandt mr-brandt added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 21, 2023
@melloware melloware self-assigned this Oct 21, 2023
@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 21, 2023
@melloware melloware added this to the 10.0.6 milestone Oct 21, 2023
melloware added a commit to melloware/primereact that referenced this issue Oct 21, 2023
@melloware
Copy link
Member

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants