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

Trash button alternative for patients page. #9761

Closed
cbum-dev opened this issue Jan 5, 2025 · 6 comments · Fixed by #10090
Closed

Trash button alternative for patients page. #9761

cbum-dev opened this issue Jan 5, 2025 · 6 comments · Fixed by #10090
Assignees

Comments

@cbum-dev
Copy link
Contributor

cbum-dev commented Jan 5, 2025

Is your feature request related to a problem? Please describe.
Yes, the current implementation requires users to manually delete the selected values using the trash icons before updating the selections. This is frustrating and inefficient, especially when dynamically selecting dependent dropdown values like State → District → Block Panchayat → Grama Panchayat. Manually clearing previous selections disrupts the user experience and increases effort.

Describe the solution you'd like
I would like the dependent dropdowns to dynamically update based on the previous selection without the need to manually delete values using the trash icons. Specifically:

When a new State is selected, the District dropdown should automatically update with the relevant districts for that state, and any previously selected values in District, Block Panchayat, and Grama Panchayat should be cleared automatically.
When a new District is selected, the Block Panchayat dropdown should dynamically update, and any previous values in Block Panchayat and Grama Panchayat should be cleared.
The trash icons should be removed as they are no longer necessary with this dynamic behavior.

Describe alternatives you've considered
Keeping the trash icons but making them optional and adding a "Clear All" button to reset the entire form quickly.
Using a cascading dropdown feature where selections are grayed out or hidden based on dependencies, rather than resetting them.

Additional context
Add any other context or screenshots about the feature request here.
Image

@cbum-dev
Copy link
Contributor Author

cbum-dev commented Jan 5, 2025

@rithviknishad and @bodhish I would like to work on this issue.

@rithviknishad
Copy link
Member

@cbum-dev Do specify how you are planning to achieve this before implementing the changes

@cbum-dev
Copy link
Contributor Author

cbum-dev commented Jan 5, 2025

@cbum-dev Do specify how you are planning to achieve this before implementing the changes

When a user interacts with an input box, the system should first validate the value of the preceding input field. If the preceding field is empty, it should default to displaying the list of states. For example, if the state is set to "Kerala," clicking on the district input box should display the districts of Kerala. Similarly, once a district is selected, the local body input box should display the options relevant to that district. If the user changes their mind and decides to modify the district, the system should revalidate the state and update the district options accordingly.

@github-actions github-actions bot added needs-triage question Further information is requested labels Jan 5, 2025
@Jacobjeevan
Copy link
Contributor

Jacobjeevan commented Jan 6, 2025

@cbum-dev How far along are you with this? 🤔 I'm doing something similar for Organization Filter (9748), might as well as replicate that logic for this issue rather than duplicating work.

@Jacobjeevan Jacobjeevan removed question Further information is requested needs-triage labels Jan 6, 2025
@cbum-dev
Copy link
Contributor Author

cbum-dev commented Jan 6, 2025

@cbum-dev How far along are you with this? 🤔 I'm doing something similar for Organization Filter (9748), might as well as replicate that logic for this issue rather than duplicating work.

I need some more time for this.

@Jacobjeevan
Copy link
Contributor

Jacobjeevan commented Jan 6, 2025

@cbum-dev How far along are you with this? 🤔 I'm doing something similar for Organization Filter (9748), might as well as replicate that logic for this issue rather than duplicating work.

I need some more time for this.

Not a priority, so take your time. But I meant if you haven't done much, I can just take over rather than having you duplicate the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants