-
Notifications
You must be signed in to change notification settings - Fork 477
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: Clear button functionality and center-align dropdown arrow (#8815) #8817
Fix: Clear button functionality and center-align dropdown arrow (#8815) #8817
Conversation
… fix#8815/fix-clear-button_aligned-arrow
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@rithviknishad @nihal467 the cross button is implemented such that it opens the dropdown on click , do you want to remove this? current: 17.10.2024_16.19.02_REC.online-video-cutter.com.mp4i have implemented the changes which will not open the dropdown on click of cross button, should i push? 17.10.2024_17.49.55_REC.mp4 |
@NitinPSingh the cross button is implemented such that it opens the dropdown on click , keep this behavior itself |
@nihal467 ok , i havent push that part yet , so the current code will clear the selected and also open the drop-down |
@NitinPSingh https://github.com/ohcnetwork/care_fe/actions/runs/11402328266/job/31727083859?pr=8817 , there is cypress failure, can you fix it |
all green now |
LGTM |
@NitinPSingh Please do add a human firendly title for the PR |
@@ -99,7 +100,7 @@ export default function SpokeFacilityEditor(props: SpokeFacilityEditorProps) { | |||
showNOptions={8} | |||
selected={selectedFacility} | |||
setSelected={(v) => | |||
v && !Array.isArray(v) && setSelectedFacility(v) | |||
(v === null || (!Array.isArray(v) && v)) && setSelectedFacility(v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a big deal, but since you are specifying the type for state object to be FacilityModel or null, probably don't need the (&& v) check anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NitinPSingh Like @Jacobjeevan mentioned, the logic wouldnt be effected but its hard to read, please simplify it to something like
(v === null || (!Array.isArray(v) && v)) && setSelectedFacility(v) | |
(v === null || !Array.isArray(v)) && setSelectedFacility(v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -99,7 +100,7 @@ export default function SpokeFacilityEditor(props: SpokeFacilityEditorProps) { | |||
showNOptions={8} | |||
selected={selectedFacility} | |||
setSelected={(v) => | |||
v && !Array.isArray(v) && setSelectedFacility(v) | |||
(v === null || (!Array.isArray(v) && v)) && setSelectedFacility(v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NitinPSingh Like @Jacobjeevan mentioned, the logic wouldnt be effected but its hard to read, please simplify it to something like
(v === null || (!Array.isArray(v) && v)) && setSelectedFacility(v) | |
(v === null || !Array.isArray(v)) && setSelectedFacility(v) |
…and print buttons (ohcnetwork#8879)
Co-authored-by: rithviknishad <[email protected]>
👋 Hi, @NitinPSingh, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
something went wrong here i guess let me fix , i create new pr |
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
17.10.2024_16.19.02_REC.online-video-cutter.com.mp4