Skip to content

Commit

Permalink
Fix: Date & Time selection box is clipping out on mobile devices (#10091
Browse files Browse the repository at this point in the history
) (#10211)

Co-authored-by: Kamishetty Rishith <[email protected]>
  • Loading branch information
nihal467 and Rishith25 authored Jan 27, 2025
1 parent 84a33f5 commit c8025dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Common/DateInputV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ const DateInputV2: React.FC<Props> = ({
const popOverX = popoverButtonRef.current?.getBoundingClientRect().x || 0;
const popOverY = popoverButtonRef.current?.getBoundingClientRect().y || 0;

const right = popOverX > viewportWidth - (allowTime ? 420 : 300);
const top = popOverY > viewportHeight - 400;
const right = popOverX > viewportWidth - 300;
const top = popOverY > viewportHeight - 300;

return `${right ? "sm:-translate-x-1/2" : ""} ${top ? "md:-translate-y-[calc(100%+50px)]" : ""} ${right ? "max-sm:-translate-x-1/2" : ""} ${top ? "max-sm:-translate-y-[calc(100%+50px)]" : ""}`.trim();
};
Expand Down
2 changes: 0 additions & 2 deletions src/components/Symptoms/SymptomsBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ export const EncounterSymptomsBuilder = (props: {
>
{items.map((symptom) => {
const handleUpdate = async (event: FieldChangeEvent<unknown>) => {
setIsProcessing(true);
const { res } = await request(SymptomsApi.partialUpdate, {
pathParams: { consultationId, external_id: symptom.id },
body: { [event.name]: event.value },
Expand All @@ -122,7 +121,6 @@ export const EncounterSymptomsBuilder = (props: {
props.onChange?.();
await refetch();
}
setIsProcessing(false);
};

const handleMarkAsEnteredInError = async () => {
Expand Down

0 comments on commit c8025dc

Please sign in to comment.