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

AutoComplete: ForceSelection reseting value on blur events even if no changes is made. #2176

Closed
dattebayorob opened this issue Jul 8, 2021 · 7 comments · Fixed by #2751
Closed
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Type: Bug Issue contains a defect related to a specific component.

Comments

@dattebayorob
Copy link

I'm submitting a ... (check one with "x")

[ X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)

https://codesandbox.io/s/damp-frog-znwfk

Current behavior

The Autocomplete componente reset value of field ( Calling onChange ) event if no change is made and value is setted.

Expected behavior
Force selection should reset value only if no valid value is setted

PrimeReact Version: The last one

@mcandu mcandu self-assigned this Jul 12, 2021
@mcandu mcandu changed the title InputMask: ForceSelection reseting value on blur events even if no changes is made. AutoComplete: ForceSelection reseting value on blur events even if no changes is made. Jul 12, 2021
@mcandu mcandu added the Type: Bug Issue contains a defect related to a specific component. label Dec 10, 2021
@julianomqs
Copy link

julianomqs commented Apr 13, 2022

Problem still occurs in version 7.2.1. Can you guys solve it in 8.0.0 version?

@melloware
Copy link
Member

PR submitted. Will hopefully be merged for 8.0.0-rc2

@sandrocsimas
Copy link

sandrocsimas commented Nov 29, 2023

@melloware, this is still happening in the latest version. Could you please check this again?
Here is an example. It is using react-hook-forms:
https://codesandbox.io/p/sandbox/dawn-snowflake-lcqs7d?file=%2Fsrc%2FApp.js%3A89%2C20

With the forceSelection, the input is cleared in the onBlur event. Without it, it works.

@melloware
Copy link
Member

@sandrocsimas i think that is intentional when forceSelection? Is your reproducer the same as the original in this ticket?

@sandrocsimas
Copy link

sandrocsimas commented Dec 1, 2023

@melloware I created that example from scratch in Codesanbox. I don't think that is the intentional behavior of forceSelection, because it is clearing the selection even when you select an option. So, there's no usability to this option. For me, this should happen only when you don't select and leave some free text in the input.

@melloware melloware removed this from the 8.0.0-rc.2 milestone Dec 1, 2023
@melloware melloware reopened this Dec 1, 2023
@github-actions github-actions bot 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 1, 2023
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 1, 2023
@melloware melloware removed their assignment Dec 1, 2023
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Nov 26, 2024
Copy link

github-actions bot commented Dec 3, 2024

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants