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

Can't paste a decimal value when there is a total value in the input. #5034

Closed
zdebski opened this issue Jan 5, 2024 · 7 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@zdebski
Copy link

zdebski commented Jan 5, 2024

Describe the bug

Current behavior
When there is a total value, e.g., "100," I can't paste the value "100,1". I can do it only when the value in the input is also a decimal.

vue-input

The main issue is, for example, working with various types of spreadsheets. Attemping to paste values from spreadsheets into the Vue input component is now impossible.

Expected behavior
There should always be the possibility of pasting value to the input, no matter if it's decimal or total.

Possibly related to: #4430

Reproducer

PrimeVue version

3.45.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Firefox 121.0 , Chrome 120.0.6099.130

Steps to reproduce the behavior

  1. Type the value 100 into the Vue input component.
  2. Copy value 100,1
  3. Try to paste the value into the Vue input component.

Expected behavior

There should always be the possibility of pasting value to the input, no matter if it's decimal or total.

@zdebski zdebski added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 5, 2024
@tugcekucukoglu
Copy link
Member

tugcekucukoglu commented Jan 5, 2024

Are you using minFractionDigits and maxFractionDigitsproperties? It might be related with this.

@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 Jan 5, 2024
Copy link

github-actions bot commented Jan 5, 2024

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.

@mertsincan mertsincan added this to the 3.47.0 milestone Jan 11, 2024
@zdebski
Copy link
Author

zdebski commented Jan 16, 2024

Are you using minFractionDigits and maxFractionDigitsproperties? It might be related with this.

We use maxFractionDigits equal to the precision, so:
if the precision is 0 then maxFractionDigits = 0

@tugcekucukoglu
Copy link
Member

Could you update this demo according to your use case?

@zdebski
Copy link
Author

zdebski commented Jan 16, 2024

@tugcekucukoglu
Copy link
Member

In the demo you sent, it seems that copy-paste works correctly. How can we see the real problem?

@tugcekucukoglu
Copy link
Member

We added an update for InputNumber for the version 3.47.0. Both inputs must accept decimals and have the same maxFractionDigits values. If you think the issue persists, please add an update.

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Jan 23, 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

3 participants