-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Multi-step modals closing unexpectedly (#33158)
- Loading branch information
1 parent
9ef09d8
commit 5cbbb45
Showing
9 changed files
with
22 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Fixes an issue where multi-step modals were closing unexpectedly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 5 additions & 17 deletions
22
apps/meteor/client/components/GenericModal/GenericModalSkeleton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
import { Skeleton } from '@rocket.chat/fuselage'; | ||
import { useTranslation } from '@rocket.chat/ui-contexts'; | ||
import type { ComponentProps } from 'react'; | ||
import React from 'react'; | ||
|
||
import GenericModal from './GenericModal'; | ||
|
||
const GenericModalSkeleton = ({ onClose, ...props }: ComponentProps<typeof GenericModal>) => { | ||
const t = useTranslation(); | ||
|
||
return ( | ||
<GenericModal | ||
{...props} | ||
variant='warning' | ||
onClose={onClose} | ||
title={<Skeleton width='50%' />} | ||
confirmText={t('Cancel')} | ||
onConfirm={onClose} | ||
> | ||
<Skeleton width='full' /> | ||
</GenericModal> | ||
); | ||
}; | ||
const GenericModalSkeleton = (props: ComponentProps<typeof GenericModal>) => ( | ||
<GenericModal {...props} icon={null} title={<Skeleton width='50%' />}> | ||
<Skeleton width='full' /> | ||
</GenericModal> | ||
); | ||
|
||
export default GenericModalSkeleton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 2 additions & 9 deletions
11
apps/meteor/client/views/teams/contextualBar/members/RemoveUsersModal/RemoveUsersModal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters