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

[Bug]: Unable to clear previous input when changed the type to Currency Input in JSON Form widget #12708

Open
1 task done
chandannkumar opened this issue Apr 8, 2022 · 6 comments
Assignees
Labels
Bug Something isn't working Currency Input Widget Issues related to currency input widget JSON Form Issue / features related to the JSON form wiget Low An issue that is neither critical nor breaks a user flow Production Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@chandannkumar
Copy link

chandannkumar commented Apr 8, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Description

LOOM DEMO

Steps To Reproduce

  1. Add a JSON form widget onto canvas
  2. change existing type field to Currency Input type. for ex - Employee Id(number input) to Currency Input type with some input
  3. Try to clear the input and observe that you are unable to clear the previous input. It runs in loop

Public Sample App

No response

Version

Cloud/Production

@chandannkumar chandannkumar added Bug Something isn't working Low An issue that is neither critical nor breaks a user flow Needs Triaging Needs attention from maintainers to triage Currency Input Widget Issues related to currency input widget JSON Form Issue / features related to the JSON form wiget labels Apr 8, 2022
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets UI Building Pod labels Apr 8, 2022
@dilippitchika
Copy link
Contributor

@chandannkumar this may be happening across different fields as well, have you checked across all the types of possible inputs already?

@chandannkumar
Copy link
Author

Yes, I have tested for all field types of json form
The issue for not clearing the previous input exists only on Currency Input type and not other field types.

@dilippitchika
Copy link
Contributor

Thanks for the info. We will triage this.

@ashit-rath
Copy link
Contributor

React Hook Form doesn't take undefined as a value and when we clear a currency input we are actively setting the value as undefined as it is a numeric field. As this undefined is not supported by React Hook Form, it is changed to whatever the previous field's default value was as a fallback.

The ideal way to fix this is to not use undefined but use null when clearing the value.

This change may break users' apps so this should be fixed in V2.

@Skarema
Copy link

Skarema commented Jun 18, 2023

Does the currency input field work at all within a JSON form? Because I can't change the value.

@ashit-rath
Copy link
Contributor

ashit-rath commented Jun 19, 2023

@Skarema The current input field value is not working because of this issue. Let me check with the team to prioritise this

@Nikhil-Nandagopal Nikhil-Nandagopal added the Widgets & Accelerators Pod Issues related to widgets & Accelerators label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Currency Input Widget Issues related to currency input widget JSON Form Issue / features related to the JSON form wiget Low An issue that is neither critical nor breaks a user flow Production Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests

6 participants