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

[Bugfix] Input Value Changes On Product Selector #2295

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Civolilah
Copy link
Collaborator

@beganovich @turbo124 The PR includes fixes for changing the input value on the product selector. Let me know your thoughts.

@@ -325,6 +325,7 @@ export function useResolveInputField(props: Props) {
<ProductSelector
key={`${property}${resource?.line_items[index][property]}`}
onChange={(value) =>
value.resource &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Civolilah can you elaborate this line change? We gotta be extra careful with such changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beganovich This change is not required, so I've removed it. I added it while trying to find the source of the issue. However, it would not have caused an issue because the onChange function is dedicated to changing values in the dropdown by selecting the whole resource - if there is no resource, we cannot take prop values from it. For the product selector, we have a specific case where the entered input value needs to be set as product_key without specific selection. So, while this has been removed, the issue is resolved by properly using the onInputValueChange function.

@beganovich beganovich added the more information requested Needs more info from OP label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants