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

fix: Selected Values Not Saved or Reset to Default in SelectList Component #257

Conversation

shubhamv-ss
Copy link
Contributor

Description

  • The SelectList component, part of the application's user interface for selecting items from a dropdown list, experienced an issue where the selected Sales Manager was not saved upon submitting the App Card Details. This component leverages the Autocomplete component from Material-UI to provide auto-suggestions and a user-friendly selection process.
  • Users reported that after selecting a Sales Manager from the dropdown list and submitting the App Card Details, the selected Sales Manager was not saved. This led to the Sales Manager information being lost, resulting in incomplete data submission and potential disruptions in the workflow.

Why

This change is necessary to address a critical issue where the SelectList component does not save the selected values upon form submission, or resets them to the default values. This issue affects the data integrity and user experience, as users expect their selections to be retained and accurately reflected in the submitted data.

  • Data Integrity: Ensuring that the selected values are correctly saved prevents data loss and maintains the integrity of the information submitted by the users.
  • User Experience: Users need to trust that their selections are preserved. Losing or resetting the selected values can lead to frustration and errors in data entry.
  • Workflow Continuity: Inaccurate data due to unsaved selections can disrupt workflows, leading to inefficiencies and potential issues in subsequent processes.

Dependencies

There are no additional dependencies required for this change. The fix involves modifying the existing SelectList component to ensure proper handling of the selected values.

Implementing this change will enhance the reliability and functionality of the SelectList component, ensuring that it meets user expectations and maintains accurate data handling across the application.

Issue

Checklist

Please delete options that are not relevant.

  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

@shubhamv-ss shubhamv-ss added the bug Something isn't working label Aug 5, 2024
Copy link
Contributor

@lavanya-bmw lavanya-bmw left a comment

Choose a reason for hiding this comment

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

Please update changelog.md file too

@shubhamv-ss
Copy link
Contributor Author

Please update changelog.md file too

Updated

Copy link
Contributor

@lavanya-bmw lavanya-bmw left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@oyo oyo left a comment

Choose a reason for hiding this comment

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

variable naming


onChangeItem(reason)
onChange={(_event, _nextValue) => {
handleChange(_nextValue)
Copy link
Contributor

Choose a reason for hiding this comment

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

please only use names starting with underscore if the variable is not used
_nextValue change to nextValue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Code updated

Copy link

sonarqubecloud bot commented Aug 5, 2024

@shubhamv-ss shubhamv-ss requested a review from oyo August 5, 2024 11:19
Copy link
Contributor

@oyo oyo left a comment

Choose a reason for hiding this comment

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

lgtm now

@shubhamv-ss
Copy link
Contributor Author

Hey @oyo, @lavanya-bmw
If possible, can we merge this pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: IN PROGRESS
Development

Successfully merging this pull request may close these issues.

4 participants